Next Page not working, only on main blog index
-
At the bottom of my main blog page (https://www.dmk.com.au/blog showing latest 4 entries), the “Next Page >” link doesn’t work.
It links to: https://www.dmk.com.au/blog/page/2/
Where it *should* actually link to is: https://www.dmk.com.au/blog/index.php/page/2/
If I load that 2nd URL manually into the browser, I can browse my archives successfully. But it won’t work from the automatically generated link:
<p align="center"><?php posts_nav_link() ?></p>
That is in my index.php file in my template.
When I’m in one of my categories (eg DMK News, with 11 entries), this works as it should.
If I hard-code the above code on the main index to be:
<p align="center"><a href="https://www.dmk.com.au/blog/index.php/page/2/">Earlier Posts »</a></p>
Then it breaks once it is showing on page 2 and subsequent pages…. as this code is used, not the proper navigation that it usually generated by posts_nav_link.
I’ve read through about 20 relevant support topics on this, but haven’t found a solution. Most are where people NEED to have the link I am currently getting, and they don’t want the one I need. Or it’s an IIS issue with Windows, or domain pointing, and I have none of that as an issue. Same for the posts_nav_link page of the Codex, that didn’t help me either.
In trying to find a solutioni, I (stupidly it turned out!) tried to set my Site URL in the general options to be: https://www.dmk.com.au/blog/index.php
But once I hit update, I lost my whole WordPress interface, and my whole website lost complete templates/styling – just plain database page entries. Had to manually edit the database table to fix that, to restore the old value.
I thought it might be that because my blog displays as:
and
https://www.dmk.com.au/blog/index.php/page/2/
actually works. So I tried also looking at:
https://www.dmk.com.au/blog/index.php
But when I hard-code it to https://www.dmk.com.au/blog/index.php I get “Sorry, no posts matched your criteria.” — which is the error message I’m getting now for https://www.dmk.com.au/blog/page/2/ when I try to go through my archives.
I have a static home page (www.dmk.com.au is base/blog address, and “home” is the page slug).
Permalinks are working fine, browsing pages of posts is working fine in categories, not just on main page. I also tried disabling each plugin I use (only 5 of them, and none are affecting this code), and I don’t use the Adhesive plugin which seems to cause navigation troubles for some other users.
I have 2.1.3 running, but this has been happening for a while. I just decided today to try and fix it, as I was already doing the 2.1.3 upgrade.
- The topic ‘Next Page not working, only on main blog index’ is closed to new replies.