Heya – my next_posts_link and previous_posts_link aren’t working on the single view, but ARE working on the archive view. The templates are exactly the same. Here’s the code (I had to add the ‘1000’ to get it to work on the archive view):
I’ve tried disabling all plugins, checking the functions and header files for anything weird. I tried wp_reset_query before this code.
Does anyone have ideas about how I might troubleshoot this? I’ve tried several different solutions found in a Google search and no dice. I think somehow I need to figure out what variable is getting messed up and where. Any ideas?
Hi, I’ve solved a problem similar to yours.
In my case the problem was cause by the fact that the page is attached to the current url.
So, if you are on the single page example.com/posts/post1, the function returns a link like example.com/posts/post1/page/2/
i.e.: there is a “post1” that should not be there. I’ve resolved in a brutal way playing with strings functions…
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Next_Posts_Link working on archive, not working on single??’ is closed to new replies.