• Resolved peanut

    (@peanut)


    I’m stuck. I’m running WordPress 1.5. I want 4 posts to show on front page (which is working), but I want 20 posts to show when someone clicks on any and every category (I have a special category.php page). I believe I need to do posts_per_page=20 somewhere on my category.php page and replace something, but not sure where and what…

    I tried using Matt’s Custom Query String 2.6, but it would be inefficient for me as I would need to set it for each category (unless I missed something).

    The pertinent part of my category.php page looks like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("paged=$paged&cat=$cat&orderby=title&order=ASC");
    ?>
    <?php if (is_category()) { $posts = query_posts($query_string . '&orderby=title&order=asc'); } ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    I know it’s probably something very simple, but I think I’ve really confused myself in looking for answers. Guidance?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I tried using Matt’s Custom Query String 2.6, but it would be inefficient for me as I would need to set it for each category (unless I missed something).

    You did. You only need set is_category on Query to affect all categories.

    Thread Starter peanut

    (@peanut)

    Oy. Thank you so much! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Number of posts on category pages different from front page’ is closed to new replies.