slgolden
Member
Posted 3 years ago #
I searched the forum on this topic and was directed to the page explaining the next post/previous post links, but I can't understand it. It's marked as in need of editing, and that's really true.
I understand that I need to edit the index.php file of my theme, but I don't know where to insert the links in that file.
Do I just add
<?php previous_post('« « %', '', 'yes'); ?>
| <?php next_post('% » » ', '', 'yes'); ?>
and where do I add it?
Thank you for any help
Do I just add [...]
Yes - although now that you have read the Codex page on these template tags, you'll be able to edit the parameters according to your needs.
where do I add it?
Right at the end of the Loop. After the <?php endwhile; ?> and before the <?php endif; ?>.
slgolden
Member
Posted 3 years ago #
Thank you so much! I managed to do it, although I found the code only worked when I put it after the <?php endif; ?>.
philtyler
Member
Posted 2 years ago #
It's still not working for me. All I see is the "|"
I tried it before and after the '<?php endif; ?>'
philtyler
Member
Posted 2 years ago #
Code is working, but is totally in the wrong place. Check it out at
http://www.philtyler.info
scroll all the way down, how do I get them centered? Is there a way to switch the little arrows?
Thanks!
oh here's the code:
'<?php endwhile; ?>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<?php previous_posts_link('Newer Entries »') ?> <?php next_posts_link('« Older Entries') ?>
</div>'
philtyler
Member
Posted 2 years ago #
I got it with a simple '<p align="center">'
..next is getting the arrows correct..