WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to customize "paged archives" (2 posts)

  1. topdownjimmy
    Member
    Posted 8 years ago #

    My main index page is very strange (intentionally) in its handling of posts; it displays the most recent post from one category at the top, followed by the most recent posts from each of four authors, regardless of category, beneath that (http://resounder.org/).

    The trouble is, I'd like to be able to view paginated/paged archives (not by month, but by X-posts-per-page). I think this is usually done with something like http://resounder.org/page/2, but this doesn't work for me at all (due to my weird main index, it seems).

    How can I get "paged archives" like this? Thanks.

  2. topdownjimmy
    Member
    Posted 8 years ago #

    I believe I may have solved this myself; paged archives use the main index template, so I added this code to it:

    <?php if ( is_paged() ) { ?>
    ...
    <? } else { ?>
    ...
    <? } ?>

    It's just a conditional that does one thing if it's a paged archive, and another if it's not.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags