WordPress.org

Forums

[resolved] Previous / Next post links (3 posts)

  1. thejonson
    Member
    Posted 4 years ago #

    On my site, I've setup a couple of previous/next buttons using:

    <div id="footer_nav">
        <div class="pevious_post"><?php previous_post_link('%link', '<span class="ui-icon ui-icon-circle-triangle-w"></span> Previous', TRUE); ?></div>
        <div class="next_post"><?php next_post_link('%link', '<span class="ui-icon ui-icon-circle-triangle-e"></span> Next', TRUE); ?></div>
        </div>

    And this works, but they only cycle through that category, which means on the front page you might see articles 1-20, but when using the navigation you go 1,2,12,15,20 not 1,2,3,4,5 etc.

    So I guess what I;m asking is can the previous_post_link & next_post_link be configured to look at the whole site, not just the current category.

  2. Shane G.
    Member
    Posted 4 years ago #

  3. alchymyth
    Forum Moderator
    Posted 4 years ago #

    more precisely:

    http://codex.wordpress.org/Template_Tags/previous_post_link

    in_same_cat
    (boolean) Indicates whether previous post must be within the same category as the current post. If set to TRUE, only posts from the current category will be displayed. Options are:
    TRUE
    FALSE (Default)

Topic Closed

This topic has been closed to new replies.

About this Topic