• I’m working on a new design for my site and ran into one major problem. I can’t get the Previous/Next Navigation links to work. The Previous link goes to the exact same post I’m already on.

    After hours of research, I’ve seen many people have issues with the same thing, and I’ve tried every suggestion people have provided, but I’m not having any luck. This is the code that came with the template, with some modifications:

    <div class=”navigation”><center><?php posts_nav_link(”,”,'<–Previous Briefs’) ?>      |      <?php posts_nav_link(”,’Most Recent Briefs–>’,”) ?></center></div>

    I’ve changed posts_nav_link to previous_post_link() which has been suggested to other people, but that didn’t work.

    Do you see anything wrong with my code? The site I’m using to test is at https://www.inevitablemedia.com

    Thanks for any suggestions!

Viewing 3 replies - 1 through 3 (of 3 total)
  • It looks like you might have some kind of permalink issue. If you go to your archives page and click one of the listings (the may ones) you’ll see the proper nav links appear and work, but they refer to a date based system, on your main page the links directly to the posts only list a name based permalinks system. You could try swiping the nav code from your post.php, singlepost.php or whatever the individual posts page is for your theme and put that on the main page.

    Thread Starter cali15

    (@cali15)

    Thanks, Harknell. My theme has singlepost.php, but there isn’t nav code there, which makes sense because there isn’t navigation in the posts themselves. I’ve posted it below. I went into archives.php and copied the nav code from there and it didn’t work. Any other suggestions?

    Singlepost.php

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <div id=”content”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”boxpost”>
    <div class=”datario”><?php the_time(‘M d Y’); ?></div>
    <div class=”post”>
    <h2 id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>

    <div class=”entry”>
    <?php the_content(‘Read the rest of this entry »’); ?>
    </div>

    <p class=”postmetadata”><img src=”<?php bloginfo(‘template_directory’); ?>/images/folder_edit.png” alt=”category”></img> <?php the_category(‘, ‘) ?> <img src=”<?php bloginfo(‘template_directory’); ?>/images/comments.png” alt=”comments”></img> <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?> <?php edit_post_link(‘//Edit’); ?></p>

    <!–
    <?php trackback_rdf(); ?>
    –>
    </div></div>

    <?php comments_template(); ?>

    <?php endwhile; else: ?>

    <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>

    <?php endif; ?>

    <?php get_footer(); ?>

    Thread Starter cali15

    (@cali15)

    Just an update – I looked at the original demo of the theme (https://themes.wordpress.net/testrun/). The same issue occurs, so obviously it’s an issue with the theme itself. But I really want to use it for my site. I’ve emailed them, but if anyone has any ideas about what it could be, I would be very grateful!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Previous/Next Post” Navigation Issue’ is closed to new replies.