[resolved] Separate main page from archive page options (3 posts)

  1. brentk
    Posted 10 years ago #


    I would like only 1 post at a time to appear on my front page, but 10 or so to appear on the Archive pages (Categories, Archives, etc). However, the option is set for both areas with the Options->Reading->Blog Pages->Show at Most setting.

    I suggest adding "Show at Most on Main Page", "show at Most on Archive Pages" options. To work-around it, I changed my theme index.php so that the while() call looks like this:

    <?php $x=1; while (have_posts() && $x < 2) : the_post(); ?>

    <?php $x++; endwhile; ?>

    Its pretty silly, but I may want to adjust the number of posts appearing on the front page in the future.

    The problem with this hack is that if the number of posts in the database is more than or equal to the number of "Show at most" posts set in the Reading Options, then the Navigation Links won't appear. The posts_nav_link() function also uses this global "show at most" setting, and I don't want to break it.

    What would be a good way of showing 10 posts in my archive pages, while keeping the "show at most" setting at "1", so that my nav_links work on the front page?


  2. moshu
    Posted 10 years ago #

    Try this plugin (it allows you to have different number of post on different pages):

  3. brentk
    Posted 10 years ago #

    Hey thanks for the suggestion! Its exactly what I needed, and more.

Topic Closed

This topic has been closed to new replies.

About this Topic