This may help – it’s what I had on my site (might still be there in fact)
The code that appears at the top of a page when a single entry is viewed.
<?php if ($single) { ?>
<div class="cent">
<?php previous_post('%', '', 'yes', 'no', 1, '') ?>
> >
||
<a href="http://www.tamba2.org.uk/T2" title="Home">Home</a>
||
< <
<?php next_post('%', '', 'yes', 'no', 1, '') ?>
<br />
<br />
</div>
<?php } ?>
that is in ‘index.php’, directly above <div class="post">
Sorry but is the index.php page the one used by all pages in the site or just the “posts”?
The one above is just the posts one
It worked but my Home page link does not appear.
Also, is there a way I can just use the words “Previous” and “Next” instead of the text from the post title?
Correction.
I have not been able to get this working.
Is this how it is supposed to be inserted into the index.php file:
<?php get_header(); ?>
<div id=”content” class=”narrowcolumn”>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<?php if ($single) { ?>
<div class=”cent”>
<?php previous_post(‘%’, ”, ‘yes’, ‘no’, 1, ”) ?>
>>
||
Home
||
<<
<?php next_post(‘%’, ”, ‘yes’, ‘no’, 1, ”) ?>
</div>
<?php } ?>
<!–<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>–>
Thanks
mliving
Does this bit of code control the post to post navigation?
<div class=”navigation”>
<div class=”alignleft”>
<?php next_posts_link(‘« Previous Entries’) ?></div>
<div class=”alignright”>
<?php previous_posts_link(‘Next Entries »’) ?></div>
If so can I not make it show the following:
<<Previous || Home || Next >>
Nothing I do to the Main Template (index.php) file seems to make a difference.
Thanks
mliving
I believe the tag you use only takes effect in single-post view. To navigate between pages in frontpage, you may want to use the following.
http://codex.ww.wp.xz.cn/Template_Tags/posts_nav_link