WordPress.org

Ready to get started?Download WordPress

Forums

Different number of posts per page on a single category (6 posts)

  1. mrsolutions
    Member
    Posted 7 years ago #

    I have 10 posts per page set globally for my blog.

    However, in a single category I would like to set it so that all posts for that category are displayed rather than just 10.

    How can this be done?

    Note: I have already created a specific template for that category (e.g category-12.php)

  2. mrsolutions
    Member
    Posted 7 years ago #

    any ideas anyone?

  3. mrsolutions
    Member
    Posted 7 years ago #

    anyone anywhere?

  4. Chris_K
    Member
    Posted 7 years ago #

    See if you can track down the custom query string plugin. It does exactly what you're after.

  5. Justin Tadlock
    Member
    Posted 7 years ago #

    Put this before your <?php if(have_posts()) : ?> and it should work. I use this to list all my categories and archives in a nice, neat list on some of my themes.

    <?php if (is_category()) { $posts = query_posts($query_string . '&orderby=date&showposts=-1'); } ?>

  6. mrsolutions
    Member
    Posted 7 years ago #

    Thanks - that works great :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags