Support » Fixing WordPress » How to remove the “category” in the link ?

Viewing 15 replies - 1 through 15 (of 24 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Can’t be done. You can change the “category” to anything you like by changing the category base in the Options->Permalinks section, but it cannot be blank/empty. It must exist so as to distinguish categories from other sorts of things like pages/posts/etc.

    And if you use MU, next time please ask for assistance at

    already done moshu they asked me to post here ๐Ÿ˜‰

    Otto why work also here ?

    it seems rewrite rules still work without “category”, so ?

    It might work, but Otto42 explained it quite nicely:
    It must exist so as to distinguish categories from other sorts of things like pages/posts/etc.

    I wonder will th

    moshu, sorry for bothering, and excuse my lack in english, It was not my intention to be rude in my question.

    I understand it must exists but I Can’t still understand with my both URL actually works. The page for exemple : is a page not an Article, and it also works.

    The only thing I tryed to understand is “ok it must exists, but can’t we remove it, if it’s not absolutly necessary ?”

    thanks again for you help

    Best regards from France, and merry christmass to you all

    ps : xinfo what “th” is ?

    Attetion moderator

    all post get ripped half you can see the same one above .when i submit my full post or reply only half post is published in this forum .

    @toucouleur i just want to know from mod may this lead to duplicate content ?same post in different url…

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    The reason it “appears” to be actually working with that URL is because you have set up your permalinks with “/%category%/%postname%”. So when “divers” fails to get recognized as a page, it falls back to attempting to parse it using that permalink pattern, which sets the category and gives you something that is basically the category archive page.

    But you’re not actually *telling* it that it’s a category in the URL. You’re only getting the category as a side effect of your normal single page permalinks. If you change that permalink string, that /divers URL won’t point to the category anymore, whereas the /category/divers always will.

    Basically permalinks work in a sort of fallback mechanism. It tries to parse using one pattern, and if that doesn’t work, it does another, and then another, and so on until it finds one that works. If none of them work, you get a 404 page.

    thanks for the answer Otto, it’s a mess whatever ๐Ÿ˜ but thanks for spending time to explain :/

    Hi, I’m hoping Otto42 might have another look at this thread – or, of course, anyone who has a helpful idea :).

    I just upgraded to 2.1 and I realised that this category_base removal hack I had used for a year in 2.0x (in German –
    no longer works properly.

    The idea used in the hack is to change the category_base to an empty string and place the category rewrite rule at the end of the rewrite rule array, then used /%category%/%postname%/ as permalink structure.

    In 2.0x everything worked just lovely, including category feeds. However, in 2.1, where the functions in question have been moved from classes.php to rewrite.php, the hack doesn’t work for feeds anymore.

    I had a quick look at the rewrite functions but I could not figure out what the problem is.

    It would be great if someone helped!


    no one?

    Did anyone succeed in getting the categoy-less hack to work with feeds? I’m still lost.

    After asking around and trying some stuff, I finally figured out a hack free solution:

    In your Permalinks options, set your “Custom Structure” to


    and your “Category Base” to


    I haven’t tested this with feeds yet. And just FYI I’m using WP 2.1

    In your Permalinks options, set your “Custom Structure” to


    and your “Category Base” to


    I’ve seen this solution on several threads here (e.g. link – closed but might prove useful), but the response to this is: does it work with paged archives, i.e., /%category%/page/2/? I’ve tried it (not in 2.1) and it doesn’t work. Just a heads-up. ๐Ÿ™‚

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘How to remove the “category” in the link ?’ is closed to new replies.