vendredi 26 décembre 2014

Limit the number of posts via wpquery

We suppose that a category has 1000 posts, we can use the following code to show 10 posts per page and the wp pagenavi would present 100 pages with links of above 1000 posts.



<?php query_posts($query_string."&showposts=10&orderby=date&order=ASC") ?>


Is there any way that I show only 100 recent posts and hide remaining 900 posts because they may be too old? Thanks


Aucun commentaire:

Enregistrer un commentaire