How to Show all posts WordPress

I was surfing my Moblog archive and I noticed it was showing pagination.

Use the query_posts function just before the Loop.

Show All Posts

query_posts( 'posts_per_page=-1')

Full Code

       // Force only to show all posts for my Category 41 (Moblog)
       if(in_category(41)){ query_posts( 'posts_per_page=-1&cat=41' ); }

       if (have_posts()) : while (have_posts()) : the_post();


WordPress Codex Reference: query_posts

No comments yet, leave yours!

Leave a Reply

Add <code> Some Code </code> by using this tags.