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.
Related posts:
- Search from WordPress Admin (Post Listing) Redirecting to Home Page This is possibly the most bizarre thing I've ever seen....
- Adding a block of HTML to a WordPress post One problem with the WYSIWYG editor in WordPress is that...
- Anchor Links in WordPress Posts – another shortcode solution I was recently asked by a client how they could...
- Striping IMG tags from the_content in WordPress (and how to fudge page excerpts) Background: For a site I was working on, I was...
Related posts brought to you by Yet Another Related Posts Plugin.
scriptygoddess
