Older/Newer Posts not displaying
-
Hi all,
Can anyone help with this problem.
I have a WP site built here:
https://www.thetinderboxblog.com/khaI have an issue that the older/newer posts buttons aren’t displaying the next images in the database. It just keeps showing the first 5 posts regardless of which page you are on.
For example,
https://www.thetinderboxblog.com/kha/animals/page/2
displays the same as
https://www.thetinderboxblog.com/kha/animalsI have added some code to the functions.php that makes sure those buttons are displayed only when their are other posts in that category archive. However regardless of whether I remove that or not, the issue still persists. This is the code I have used for that:
<?php /** * If more than one page exists, return TRUE. */ function show_posts_nav() { global $wp_query; return ($wp_query->max_num_pages > 1); } ?>
Each drawing/painting category uses roughly the same code to display the posts. For the process of this question here is the code for the Animal page:
[Code moderated as per the Forum Rules. Please use the pastebin]
Can anyone see where I’m going wrong here and help me out? I’d greatly appreciate it.
Link to the page the code above references is, once again, this:
https://www.thetinderboxblog.com/khaAdam.
- The topic ‘Older/Newer Posts not displaying’ is closed to new replies.