Skip to main content
12 events
when toggle format what by license comment
Apr 13, 2017 at 12:37 history edited CommunityBot
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Jun 30, 2013 at 16:44 history edited Zayatzz CC BY-SA 3.0
added 936 characters in body
Jun 30, 2013 at 15:27 answer added rfrq timeline score: 0
Jun 30, 2013 at 15:12 vote accept Zayatzz
Jun 30, 2013 at 9:08 answer added Krzysiek Dróżdż timeline score: 1
Jun 30, 2013 at 8:45 comment added Zayatzz Nope. That still only prints out one page.
Jun 30, 2013 at 8:43 comment added fuxia If you want all posts, you have to add $query->set( 'posts_per_page', -1 );.
Jun 30, 2013 at 8:40 comment added Zayatzz Well this changed output, but i still am not getting what i want. this:if (have_posts()){ while ( have_posts() ) : the_post(); echo '<a href="">'. the_title().'</a>'; endwhile; } gets me only 1st page printed out. Not all pages.
Jun 30, 2013 at 8:37 comment added fuxia No, it doesn’t. Just use the regular if ( have_posts() ) ….
Jun 30, 2013 at 8:35 comment added Zayatzz What separate query.... The previous thread explained to me that this way i am modifying the main query. Thats like the whole reason this pre_get_posts hook exists.. no?
Jun 30, 2013 at 8:33 comment added fuxia Do not use a separate query with get_posts(). Use the main query only.
Jun 30, 2013 at 8:20 history asked Zayatzz CC BY-SA 3.0