Pagination With query_posts in a Custom WordPress Page Template

Every now and then I run into the problem where pagination doesn’t work in a custom page template. The problem usually lies in my handling of query_posts.

The solution is to write the query as follows:

 4,
  'paged' => $paged
);
query_posts($args); 
?>

[source]

Enjoy!

Posted in ,

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress consultant, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and then to twitter.com/tobycryns and twitter.com/themightymo

Follow Toby's contributions on Github and WP.org.