next and previous post link not working
-
I am trying to add the “next and previous posts” link. I found the code in codex but wasnt sure where to put it. codex specifically mentions putting the post_NAV_LINK within the wordpress loop but doesnt say where to put the next and previous post link. I copied the code and put it in the wordpress loop and nothing shows up. I inserted it into my index.php file see below. Should it actually go somewhere else or is there another problem?
https://www.aheadofthecurveatmidlife.com<?php get_header(); ?>
<div id=”content”>
<?php include(TEMPLATEPATH.”/l_sidebar.php”);?>
<div id=”contentmiddle”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?><div class=”contentdate”>
<h3><?php the_time(‘M’); ?></h3>
<h4><?php the_time(‘j’); ?></h4>
</div><div class=”contenttitle”>
<h1>” rel=”bookmark”><?php the_title(); ?></h1>
<p><?php the_time(‘F j, Y’); ?> | <?php comments_popup_link(‘Leave a Comment’, ‘1 Comment’, ‘% Comments’); ?></p>
</div>
<?php the_content(__(‘Read more’));?>
<!–
<?php trackback_rdf(); ?>
–>
<div class=”navigation”>
<div class=”alignleft”>
<?php previous_post(‘« « %’,
‘Toward The Past: ‘, ‘yes’); ?>
</div>
<div class=”alignright”>
<?php next_post(‘% » » ‘,
‘Toward The Future: ‘, ‘yes’); ?>
</div>
</div> <!– end navigation –><p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p><?php endif; ?>
<h1>Comments</h1>
<?php comments_template(); // Get wp-comments.php template ?>
</div><?php include(TEMPLATEPATH.”/r_sidebar.php”);?>
</div>
<!– The main column ends –>
<?php get_footer(); ?>
- The topic ‘next and previous post link not working’ is closed to new replies.