Support » Themes and Templates » previous_post_link and previous_posts_link issue

  • Resolved catalpha


    I would like to use the next_posts_link and previous_posts_link from the archive.php in the single.php, but if I cut and paste the links from archive.php and paste into index.php they don’t work (there not clickable).

    From archive.php
    <?php next_posts_link(‘« Older Entries’) ?> | <?php previous_posts_link(‘Newer Entries »’) ?>

    From index.php
    <?php previous_post_link(‘« %link’) ?> | <?php next_post_link(‘%link »’) ?>

Viewing 1 replies (of 1 total)
  • Chip Bennett


    Theme Review Admin

    On single.php (where only a single Post is displayed), you need to use previous_post_link() and next_post_link().

    Using previous_posts_link() and next_posts_link() on single.php will have no effect, because they are intended to be used on index pages, for navigating to previous and next index pages (index, archive, category, teg, etc.), rather than previous and next single posts.

Viewing 1 replies (of 1 total)
  • The topic ‘previous_post_link and previous_posts_link issue’ is closed to new replies.