Support » Requests and Feedback » Separate main page from archive page options

  • Resolved brentk

    (@brentk)


    Hello,

    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?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Separate main page from archive page options’ is closed to new replies.