WordPress.org

Ready to get started?Download WordPress

Forums

Next and Previous Links... (6 posts)

  1. zurdog
    Member
    Posted 8 years ago #

    I've spent about half an hour browsing the archives and still haven't found a solution that is working.

    If you visit http://inthestudioshow.com/2005/09/26/episode-1/ you'll see a link to episode 2... so it's grabbing the title of the post for the previous and next links. However, if you go to: http://inthestudioshow.com/ it comes up as previous and next for the links. I want to change that so it brings up the post title and not previous and next.

    How can this be accomplished? TIA!

  2. moshu
    Member
    Posted 8 years ago #

    Those are two different template tags.
    The main page is using Template_Tags/posts_nav_link and in the single post view the Template_Tags/next_post and its pair (previous_post) is used.
    They are not interchangeable since they perform different functions.

  3. Beel
    Member
    Posted 8 years ago #

    I did a quick search and came up with this:
    http://wordpress.org/support/topic/33255#post-194204

    One of the tags you are using is for single post page and links to the previous and next post, the other is for the main page which links to previous and next page. Looks like the link above will allow you to show previous and next post on the main page.

  4. zurdog
    Member
    Posted 8 years ago #

    I tried that solution, but received an error when I put in the code. I'm using 1.5.2 and it wasn't an upgrade... but a regular install.

  5. theglobalguy
    Member
    Posted 8 years ago #

    What kind of error did you get? Blueblurry's code works fine even on my 1.6 alpha site.

  6. zurdog
    Member
    Posted 8 years ago #

    Parse error: parse error, unexpected T_STRING in /www/i/inthestudios/htdocs/wp-content/themes/in-the-studio/index.php on line 22 ... I used <?php previous_post_index(’%',’previous’,'no’) ?>

Topic Closed

This topic has been closed to new replies.

About this Topic