Support » Fixing WordPress » Category Base Removal and Category Pagination (Revisited)

Viewing 15 replies - 1 through 15 (of 20 total)
  • Then ask “that” site – not here. We consider it a nonsense hack and it is not supported.

    My site is not just “that” site, moshu. What for kind moderator you are if you can’t be friendly. And why is it a “nonsense hack”? If I change my permalinks on my site is that illegal? And who is “we”?

    @blupixelz, send me e-mail and I will help you with your problem. You see, I can’t help you here, because of “that” friendly moderator.


    Hi. I am also having the same problem. I would love to hear how you solved this. Thanks!

    i had problems with this moderator in almost the same thread i started long time ago.. he acts like a crying kid most of the time.. Moshu iam sorry but we can’t post problems that suits your will..

    fira and mckinley.. kindly post me a solution to this one as well..

    @all: Exactly the same problem i was fiddling with to no good. Please let us know, whatever the one or other ‘admin’ considers to be interesting or nonsensical.

    @moshu: Please moshu, reconsider your tendency to censor others thoughts.

    hope somebody will post a solution soon enough !

    Any news?

    no there is no news.. everybody sleeping..

    Fira, please , could you send a hack or tell where it can be found!!
    Need it a lot. Don’t want to loose goodPR pages πŸ™‚
    My mail dimo[dot]spb[dot]ru[AT]gmail[dot]com
    Thanks in advance!!!!


    a found a solution…

    as seen at

    go to wp-includes/classes.php
    if ( isset($error) )
    $this->query_vars[‘error’] = $error;

    under it you need to place the following

    if (@$this->query_vars[“name”] == “page”)
    $tmp_ar = $this->query_vars;
    $this->query_vars = array();
    $this->query_vars[“paged”] = str_replace(“/”, “”, $tmp_ar[“page”]);
    $this->query_vars[“category_name”] = $tmp_ar[“category_name”];

    Thats it.

    works for me πŸ™‚



    Thank you, kind sir!!!!!
    It works well πŸ™‚



    Yes, thank you much.

    Im assuming when upgrading WP this will be overwriten, so CHMOD file or keep backup.


    Works for me too, thanks very much.

    The pagination fails because of a rewrite rule that, in this permalink configuration, is broken. Here’s the rule:

    (.+?)/([^/]+)(/[0-9]+)?/?$ == index.php?category_name=$1&name=$2&page=$3

    I’d love to know what WP function uses those three queryvars; haven’t had much luck grepping for them. Looks like it’s supposed to handle /cat/post/pagenum for posts spanning multiple pages. I don’t have any of those, so I don’t need that rule.

    And here’s the one we want, which appears at the bottom of the list of rules, despite being more specific:

    (.+?)/page/?([0-9]{1,})/?$ == index.php?category_name=$1&paged=$2

    The proper way to handle this problem, if it doesn’t break other parts of WP, would be to reorder the rewrite rules so that the first rule is below the second. But sdemidko’s code solves my problem now, so I’ll leave the research for later.

    I’ve dropped this into a plugin so I don’t have to worry about WP upgrades:

     * workaround_broken_wp_rewrite_rule.php
     * Plugin Name: Workaround Broken WP Rewrite Rule
     * Description: Fixes pagination for /cat-slug/page/2 style URLs
     * Author: _timk
    function workaround_broken_wp_rewrite_rule($query_vars)
      if (@$query_vars["name"] == "page") {
        $qv = array();
        $qv["paged"] = str_replace("/", "", $query_vars["page"]);
        $qv["category_name"] = $query_vars["category_name"];
        return $qv;
      return $query_vars;
    add_filter('request', 'workaround_broken_wp_rewrite_rule');

    Update: Although this worked for me in the past, it does not anymore.

    I have all my category’s as child’s of a parent “news” category. So when using this “fix” I get 404 on all category links.

    I believe this is the reason why, and not that I am using WP 2.7 now. Not 100%

    Either way, I really need help to find a work around. If you use paypal, ill throw in a donation.

    Thanks for your help…

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Category Base Removal and Category Pagination (Revisited)’ is closed to new replies.