Bizarre next_posts_link/previous_posts_link problem
-
Hi folks, got a weird problem I’m hoping someone can help me out with.
To see the problem, go to this site and note the “previous post” link at the bottom of the entry:
If you click on that link, it takes you to the next post and also gives you a previous post link, and you can navigate through all of the posts on the site as expected.
BUT, if you click on one of the post links in the sidebar, the post doesn’t have those links. The ul they are supposed to appear in is empty.
Here’s the code I’m using in both home.php and single.php:
<?php if (show_posts_nav()) : ?>
<div class=”pagination”>-
<li class=”prevlink”><?php next_posts_link(‘Previous Post’); ?>
<li class=”nextlink”><?php previous_posts_link(‘Next Post’); ?></div>
<?php endif; ?>And here’s the code from the functions.php file:
function show_posts_nav() {
global $wp_query;
return ($wp_query->max_num_pages > 1);
}Any ideas?
- The topic ‘Bizarre next_posts_link/previous_posts_link problem’ is closed to new replies.