WordPress.org

Ready to get started?Download WordPress

Forums

How to over-ride maximum-posts-per-page for archive pages? (4 posts)

  1. ajs
    Member
    Posted 8 years ago #

    I am creating an archive.php that only lists post titles with no post content. Somewhere in this code is the command that is telling the page to limit the number of posts to those specified in the Dashboard (same as on index.php). I want it to display all the posts for that archive query:

    <?php if (have_posts()) :?>
    <?php $postCount=0; ?>
    <?php while (have_posts()) : the_post();?>

    Sure it is a simple tweak, just not sure what to do.

    Thanks for any help.

  2. ajs
    Member
    Posted 8 years ago #

    or suppose that rather than show all results, i wanted to limit the list to a certain number of posts that is different than the number specified for the index in the wp-admin settings..

  3. Chris_K
    Member
    Posted 8 years ago #

    You could have a look at the the documentation for The_Loop as I think there's an example there to specify post count.

    Or, you could google up the Custom Query String plugin that'll do it a bit easier.

  4. ajs
    Member
    Posted 8 years ago #

    that is a beautiful plugin, thank you!!!!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags