Support » Fixing WordPress » Remove Category Base in WP 2.7

  • I first installed WP into a sub directory of my website as a “news” blog. Now I am installing on root and will use as a CMS. My news blog has many index pages with google etc, so my plan was to make a category called “news” and all my category’s would then be childs of “news”. So my urls would look like

    This seemed to work fine when navigating to a post, however, when clicking on category links it takes me to /

    I tried removing code in classes.php etc which only resulted in 404’s. All the hacks and tricks I have found do not work with my setup, they either require a .html extention on the url, or do not work with childs category’s.

    I could really use help, do not want to loose indexed pages or have a non-logical architecture.

    My permalink structure is %category%/%slug% and I am running wp 2.7.

    If you are a pro, I can kick you down some cash via paypal donate.


Viewing 1 replies (of 1 total)
  • Here is the code that worked for me with only 1 level of categorys (no childs)

    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"];

Viewing 1 replies (of 1 total)
  • The topic ‘Remove Category Base in WP 2.7’ is closed to new replies.