WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have a page called "Blog" (slug "blog"), which loads a index.php. All posts in index.php belong to only one post category. A sidebar on index.php contains category links (via wp_list_categories) which load archive.php for that given taxonomy.

The problem I am running into is that I currently have the category base name set to the same slug as the page: "blog". I am aware that this can cause issues with the rewrite rules, but for the most part everything looks fine. The only issue is with pagination pages for index.php (mysite.com/blog/page/2 does not work while mysite.com/blog/foo-category/page/2 works fine).

Is there a rewrite rule that can help with my current situation? And if so some help would be appreciated.

If this is a bad idea, please speak up as well. I was hoping to achieve a somewhat RESTful url structure, but wordpresses permalink structure doesn't appear to be the most flexible.


share|improve this question
up vote 2 down vote accepted

This is untested, but should work for you. Visit the permalinks settings page to flush rewrite rules after adding:

function wpa_fix_blog_pagination(){
add_action( 'init', 'wpa_fix_blog_pagination' );
share|improve this answer
Thanks Milo, that worked perfectly. Since you seem to know a thing or two about rewrite rules, do you see anything wrong/dangerous about using this permalink structure down the road? – Paul T Sep 18 '13 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.