23 May, 2004
"Previous Post | Home | Next Post" links in wordpress
Posted by: Jennifer In: WordPress: Lessons Learned
Charlene just mentioned this in the comments of another post, so I thought I'd post how I'm doing it on my pages (or will be doing it – once I finish them all)
After the "WordPress Post loop" begins (which starts like this) :
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
Put this:
<?php if ($single) { ?>
<?php previous_post('% |',",'yes') ?> <a href="<?php bloginfo('url'); ?>">Home</a> <?php next_post('| %',",'yes') ?>
<?php } ?>
post updated 5/29/04 to include a few of the suggestions in the comments.