What is the page_link navigation you want to set? With wp_link_pages, you’ve got quite a few parameters you can set:
http://codex.ww.wp.xz.cn/Template_Tags/wp_link_pages
So before, after, nextpagelink, previouspagelink, pagelink, and more_file should allow you to do what you want to do, right? I think you’re creating a function for something that already exists. Give me more details so I can get a better idea of what you’re trying to do.
Thread Starter
uxte
(@uxte)
Thanks for the reply tsguitar,
The code I’m using is bellow:
<div id="pagenav" class="navlink">
<span class="alignleft"><?php link_pages('', '', 'next', '', '<img src="wp-content/themes/brink/images/button_prev.gif" alt="Previous button"/> Previous page'); ?></span>
<span class="alignright"><?php link_pages('', '', 'next', 'Next page <img src="wp-content/themes/brink/images/button_next.gif" alt="Next button"/>', ''); ?></span>
</div>
I’m using images for the navigation and the “pagenav” has a background associated with it. Like it is right now when there is no subpages it shows the “pagenav” background, what I want is that in that case nothing shows. Basically I want to show/hide the pagenav div depending on if there are subpages or not.
Thread Starter
uxte
(@uxte)
Ok I found the answer for this one, thanks Otto42 for the hint 😉
If anybody’s looking for the same here is the code:
<?php
if ( $numpages > '1' ) :
echo $numpages;
else :
echo no pages;
endif;
?>