Post Nav
-
Hi,
I found an excellent post nav hack by Sam Burdge that enables a divider to be hidden if on first and last page.
Here’s the code:<div class="navigation"> <div class="alignleft"> <?php posts_nav_link('','', __('← Older')); ?> <?php $divider = ' | '; ?> <?php $page_num = $paged; ?> <?php $max_num_pages = $wp_query->max_num_pages; if($page_num == ''){$page_num = '1';} ?> <?php if($page_num>1 && $page_num<$max_num_pages){echo $divider;} ?> <?php posts_nav_link('', __('Newer →'),''); ?> </div> </div>
Could anyone advise me on how to modify this so that it works on single pages…?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Post Nav’ is closed to new replies.