to dirprocess: getting posts                                            rev 8 apr 2022

Category: CPWP - coding

⇒  On this page: getting all the posts↓  note title↓   links↓

.........................
✶ getting all the posts:

  - in the $args array passed to query_posts():
        'posts_per_page' => -1

  - or pass WP_Query (which is what query_posts uses) 
      the 'nopaging' argument, which basically does the same thing.
        $args = array (
            'nopaging' => true; 
            // Your other args, etc..
        );

  - Be careful as this can hang if there are many posts.

  - more discussion at
     https://wordpress.stackexchange.com/questions/36160/posts-per-page-no-limit

.........................
✶ note title:

  ...



.......................................................
➽  links and resources: 





_______________________________________________________
begin 8 apr 2022
-- 0 --