How to Insert Titles Instead of Previous/Next Links
Posted by Joe Hauckes
If you're new here,
You may want to Subscribe to my RSS Feed or if you prefer ... Subscribe via e-mail. Thanks for visiting!

When your readers stop by on an individual post you probably would like them to read some of your other posts. But when they get to the end of your article the only thing they see is <- Previous or Next ->.
Why not give them an idea of what your “Previous post” is by adding the Title of the Article they would be reading?
First look in your Single Post php for your navigation class, it looks something like this:
<p class=”pagenav”><?php previous_post(’%',’« Earlier’, ‘no’); ?> | <?php next_post(’%',’Newer »’, ‘no’); ?> </p>
Using the same class designation (ie p class=”pagenav instead of div class=”navigation”) insert the following code:
<div class=”navigation”>
<span class=”alignleft”><?php next_posts_link(’& la quo ; ‘. __(’Earlier Entries’)) ?></span>
<span class=”alignright”><?php previous_posts_link(__(’Newer Entries’).’ & ra quo ;’) ?></span>
</div>
Save the code and go look at the navigation links at the bottom of a post, it should give you the Titles of the “previous” and “next” posts. You may have to make some minor adjustments to get the look you want, but it should work just fine. (Be sure to remember, there are no spaces in (& ra[la] quo ; )
If you don’t have a single post php, look for the navigation code in your Index php right after your content info.
Related Posts:




Leave a Reply