Site Header Picture

WordPress Pagination Issue

Posted Saturday, November 17th, 2012 01:26 am GMT -6 in Housekeeping, Technology

Not sure when it started happening, but if you scroll to the bottom of the 7minutemiles.com home page and hover over the “Older posts” link, the URL shows as 7minutemiles.com/page/2. My web server, though, is redirecting that back to 7minutemiles.com via an Apache 301 redirect. Not good.

The older posts can be viewed by using a different URL – 7minutemiles.com/?paged=2 for the second page of posts, 7minutemiles.com/?paged=3 for the third page, and so on. So at least I know they are still there.

This type of problem is usually related to the Permalinks section in WordPress Settings and the .htaccess file it manipulates. I checked out the current .htaccess file, recreated it, restored an old version from backup to compare and tried various structural settings within the admin section (default works, but I want my standard day and name URLs that match what Google has indexed).

What’s weird is that pagination within category pages works fine (i.e. – 7minutemiles.com/category/golf/page/2 for example). My web server log isn’t throwing any errors and seems to be configured the same as it ever was (no recent upgrades). I did have a few Jetpack plugin upgrades recently, but deactivating that made no difference. I’m also not using any add-in pagination plugins.

A WordPress support site had a few threads mentioning that the 3.4 upgrade changed some things with pagination, but I’m pretty sure it was working since I moved to the 3.4.x series (currently on 3.4.2). My issue is a little different than that post, plus you wouldn’t think you’d need a function.php fix for basic pagination on the home page. Here is my theme PHP code that generates the link:

next_posts_link('« Older posts')

That generates the right URL, so I’m confused as to whether this is a WordPress issue or an Apache issue. Guess I’ll look at it with fresh eyes tomorrow…

Originally published by DK on November 17, 2012 at 1:26 am

Leave a Reply

Your email address will not be published. Required fields are marked *

 

DK Avatar
DK on Twitter DK on Facebook DK on Instagram Email DK 7 Minute Miles RSS Feed
612.224.5422
Husband, dad and stadium IT director

Personal Records & Mileage

  • Mile - 6:10
  • 5K - 21:42
  • 10K - 44:40
  • Half - 1:38:40
  • Marathon - 3:43:32
  • 2017 Mileage: 222.2

Search 7 Minute Miles