Support » Themes and Templates » Different number of posts per page on a single category

  • mrsolutions

    (@mrsolutions)


    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)

Viewing 5 replies - 1 through 5 (of 5 total)
  • mrsolutions

    (@mrsolutions)

    any ideas anyone?

    mrsolutions

    (@mrsolutions)

    anyone anywhere?

    Chris_K

    (@handysolo)

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

    Justin Tadlock

    (@greenshady)

    WordPress God

    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'); } ?>

    Thanks – that works great 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Different number of posts per page on a single category’ is closed to new replies.