Forums

Category Base? (7 posts)

  1. BPartch
    Member
    Posted 6 years ago #

    Is there anyway to eliminate the Category Base from my permalink structure? I currently have a custom one, set to "articles" but would like to eliminate it, if possible?

    So:
    http://my-site.com/articles/interviews/
    becomes
    http://my-site.com/interviews/

    Currently both lead to the same archive.php file.

    Thanks in advance.

  2. James
    Happiness Engineer
    Posted 6 years ago #

    Go to Options/Permalinks, delete the value that you entered into the Category base field, and hit the update button.

  3. schestowitz
    Member
    Posted 6 years ago #

    See the page in your administration panel which deals with generating your permalink code (mod_rewrites). Modify things to have the structure that you want and paste in onto .htaccess. Also, you might need to quote the relevant part of your .htaccess here as we have no access to it.

  4. BPartch
    Member
    Posted 6 years ago #

    Go to Options/Permalinks, delete the value that you entered into the Category base field, and hit the update button.

    All that seems to do is restore it to the default catagory. I want to elimanate it completly.

  5. jmdenne
    Member
    Posted 6 years ago #

    Just to ditto BPartch's last post - how does one elimanate Category base completely?

  6. moshu
    Member
    Posted 6 years ago #

    It has been asked several times... and it seems you can't. If the "category base" is not there WP thinks it's a Page.

  7. stella
    Member
    Posted 6 years ago #

    i made a quick hack in my classes.php (wordpress 2.0) because i wanted to get rid of that as well and up to now it seems to work - but i am just messing around with a local test installation.

    this is my new line 1057:

    $this->category_structure = $this->front;

    and my new line 1619:

    $this->query_string = apply_filters('query_string', str_replace('%2F', '&name=', $this->query_string));

    like i said, just some quick hack. it will definitely go wrong if your categories or entry names contain any slashes but i leave the bulletproof implementation up to someone who is more familiar with things.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.