Global Post-2-Post Navigation Needed
-
In case you missed this, this, this, or this, I’m looking for a “previous post-home-next post” chronological navigation that begins at home (index.php). Basically, this is for a “1 posts paged” WP site.
So far, the most promising code snippet presented has been:
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<?php the_date('','<h2>','</h2>'); ?>
<?php previous_post('%', 'previous ', 'no', 'no', 1, '') ?>
" title="home"> home
<?php next_post('%', ' next', 'no', 'no', 1, '') ?>
However, I want two things added:
1. Replace the text links with images.
2. Only have the “previous” link show on the index.php page. Currently, the “home” link is showing also, but that isn’t good because the index.php page is home.
It was suggested that I do something with anif else
combination:Something like :
(in your index.php file)
If current page is “index.php” (and nothing else after that address…)
then echo<?php posts_nav_link('seperator','previous',''); ?>
else echo<?php posts_nav_link('seperator','previous','next'); ?>
I have no idea how to do this. So, I am asking for some help, please.
- The topic ‘Global Post-2-Post Navigation Needed’ is closed to new replies.