• Hello all,

    I’ve been having some troubles with my Previous Posts link on my homepage. The link appears as normal “/index.php?paged=2”, but I get a 404 Not Found error for this link “/page/2/”. Also, I’ve noticed that my 404 page is the default apache error page and not my wordpress 404 error.

    Here is some other info that may be useful…

    https://thepianobar.org/27/ is my homepage.

    at the root of my webspace, my index.php page has a php redirect to send people to my wordpress homepage so that https://thepianobar.org goes to my wordpress install. I deleted this redirect file to see if it was somehow messing things up, but got no other results.

    I use a number of plugins. Permalink Redirect 0.5.2 by Scott Yang being one of them. But I have deactivated most all of these, tried again and gotten the same results.

    I’m also using the default permalink structure and a modified Kubrick theme (basically just replaced images and colors).

    Before I started messing around with all of this, it seemed like you could type in anything after thepianobar.org and if there wasn’t a file or folder of that name, it would just redirect you to my homepage. Somewhere in my messing around with this, that problem went away.

    Thanks in advance for anyone who can help me out with this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same problem, with the Classic theme. The front page “previous posts” footer button gives a “404”. Everything else is fine. I too tried plugins to solve it, but with no result. If I find the solution, I’ll post here

    Since this was only _not_ working on the front index page, I solved it by duplicating index.php, re-naming it as archive.php (which does not otherwise exist, with the Classic template) and then edited the index.php page to remove the “previous posts” navigation element.

    I now have a “follow on” of post titles & links that display at the bottom of the index page, offset by the number of posts I display on my front page (in this case, 20)…

    Tweak and paste this snippet…

    **

    Earlier posts…<br>

      <?php
      $posts = get_posts(‘numberposts=20&offset=20’);
      foreach($posts as $post) :
      ?>

    • “><?php the_title(); ?>.
    • <?php endforeach; ?>

    **

    oops, this forum isn’t “code posting friendly”. There are bits that don’t display. Oh well. You can read up on the idea here…

    https://codex.www.ads-software.com/Template_Tags/get_posts

    I’m having a similar problem to this on the archive pages. The previous_posts_link (%category%/page/2/) is producing a 404 error. Oddly this is working ok on one blog, but not on another and I can’t see any immediately obivous cause.

    The site only displays category archives (with different sections of the site being defined by categories) – you can see an example here: https://www.rockcandyrecords.co.uk/catalogue. Its using the %category% in the permalink structure.

    Anyone have any idea what might be up here?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Previous posts link not working’ is closed to new replies.