Support » Fixing WordPress » Page links don’t work on categories

  • Resolved Foofy


    Using the latest version of WordPress I’ve set up my permalink structure for categories something like this:

    This works fine except for the page links like just give WP’s “not found” error. It works fine if my category base is something else though, like:

    At first I thought it was something wrong with the mod_rewrite stuff. If I type in index.php?category_name=cows&paged=2 it shows up just fine. I’m also pretty sure mod_rewrite is working normally. All my other rewriting rules work perfectly, and if I set it to redirect (instead of rewrite) it also works just fine.

    My guess is that somewhere along the line WordPressitself checks the actual URL given and does something screwy with it. Does anybody else have this problem? Know of a workaround? Anything?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I fixed it! It took me a bit to understand the new way WordPress handles URL rewriting. It seems if no category base is specified (by just putting / in the option box) it sets it to “category/”.

    This can be fixed by changing line 1079 in classes.php:

    $this->category_structure = $this->front . 'category/';


    $this->category_structure = $this->front . '/';

    Assuming that it is actually something that’s “broken” and needs to be fixed. I’m betting there’s a reason for it I’m just not aware of.

    Actually, the above code breaks everything. I’m obviously too tired to know what I’m doing.

    I’m betting there’s a reason for it I’m just not aware of.

    There is. If no “category base” is defined then a permalink like is perceived by WP as a Page!


    Well, I have been searching for hours to find how to remove the category base, and I thought I would give your idea a shot, and well, it worked!.

    Seems to be fine for me so far!

    Maybe I will run into problems later, I sure hope not :/.

    I have no “pages” as such on the site, it seems that is what people were having problems with. <– cat <- news post <– another cat

    Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page links don’t work on categories’ is closed to new replies.