• 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('','', __('&larr; 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 &rarr;'),''); ?>
            </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)
  • Thread Starter mark-boyce

    (@mark-boyce)

    I’ve tried:
    <?php posts_nav_link('','', __('&larr; %link')); ?>

    But no joy…
    I’ve also tried:
    <?php posts_nav_link('&larr; %link')?>

    Which shows posts but no divider…
    Any help would be greatly appreciated.

    Cheers,
    Mark

Viewing 1 replies (of 1 total)
  • The topic ‘Post Nav’ is closed to new replies.