Support » Fixing WordPress » how could i remove word “category” from urls?

Viewing 15 replies - 1 through 15 (of 59 total)
  • did you read through Using_Permalinks

    yes, and i tried all this posts

    http://wordpress.org/search/remove+category+from+url?forums=1

    i get 404 error

    can i get the direct post or steps?

    thanks

    Bump. I’d also like to do this too, and can’t find how to do so anywhere.

    I don’t see why WP is forcing me to use some kind of pointless placeholder term or “category” itself. Eg on my site:

    http://stevenpoole.net/music/ would just be much cleaner and better than what I am currently forced to use:

    http://stevenpoole.net/category/music/

    I’ll take full responsibility for never naming a post “music”. 😉

    Simply using ./ as the category prefix breaks the category archive pages.

    I considered wrapping it all in a Page, /music/, but that wouldn’t be linked to by category links in the post metadata.

    Any ideas gratefully received!

    whooami

    (@whooami)

    Member

    http://bloggerholic.com/wordpress/how-to-remove-category-base-from-permalinks-45.htm

    thats linked off one of the links above, btw. and it does work for single post pages.

    That bloggerholic.com link doesn’t work for WordPress 2.2 as far as I tested it on mine.

    Top Level Categories plugin seems to work better:
    http://fortes.com/2007/06/20/top-level-categories-plugin-10/

    But there is one bug. It doesn’t seem to know it’s on a specific page number when browsing the archive of a category. See my install of it:

    http://techvideoblog.com/cebit/page/3/
    or
    http://techvideoblog.com/ces/page/3/

    Those links don’t work in terms of “Previous Entries” always links to /page/2/ no matter what page number it actually is on. So does it mess up the wp-pagenavi that always thinks it’s on the Archive page 1 of the category.

    If I manually go to this type of URL http://techvideoblog.com/cebit/?year=2007 it will work fine cause it appends &?paged=2 instead of trying to do page number with a folder structure.

    Can anyone please confirm that Top Level Category plugin might work but simply has a bug for listing pages when browsing category archives? Can anyone see if this might be fixed somehow? Anyone succeed using bloggerholic.com’s trick on the latest version of WordPress?

    I’m willing to pay $25 using Paypal to anyone that fixes the Top Level Categories plugin or provides a working solution to remove /category/ from category permalinks and to make sure it works with category archive pages.

    whooami

    (@whooami)

    Member

    yes it does work with 2.2. — my example blog is 2.2.x.

    it doesnt change the archives, though….

    yet.

    did you try it with enough blog posts to have “Previous Entries” link appear? That’s the part that don’t work when I tried installing it. It would basically show a 404 error on blog-url/categoryname/page/pagenumber/

    whooami

    (@whooami)

    Member

    well I got it working — or rather my resident php guru did.

    I have to tell you, I have NO use this whatsoever as this is just an experimental blog, and my real site has established links that arent ever changing. Google loves me, and I want to keep it that way.

    It wasnt easy, and thats the SVN so Im not sure of how well it will port over.

    Here’s a single page:

    http://you-get.onewish.org.uk/meh/blah-blah-blah/

    Here’s page 1 of meh:

    http://you-get.onewish.org.uk/meh/

    and here’s page 2:

    http://you-get.onewish.org.uk/meh/page/2/

    and yes, I have enough posts for there to be paging.. the links work as well.

    I can write up how this was accomplished, but I think it would be a good idea for me to test it on fresh install of 2.2.whatever just to make sure it works first. Like I said, it wasnt simple; I’m just blessed in that I know a very nice and intelligent guy who bleeds PHP.

    whooami

    (@whooami)

    Member

    Assuming I can duplicate that — I might actually be able to make this a plugin. The trick is to see if I can duplicate this on a another install thats not the svn.

    whooami

    (@whooami)

    Member

    well, I managed to do the same thing on a 2.2.2. install:

    permalink page:

    http://www.village-idiot.org/smack/uncategorized/t/

    1st page of archives:

    http://www.village-idiot.org/smack/uncategorized/

    2nd page of archives:

    http://www.village-idiot.org/smack/uncategorized/page/2/

    Not so hard, once you see how to do it. I’ll see what I can work up as far as a plugin. I imagine there are other people interested in this? Yea? Nay?

    PS: I noticed a url that I suspect is yours charbox, hit the .uk links above. I’ll assume everything worked to your satisfaction, since you didnt reply back with any concerns. 🙂

    Is this solution safe even for cases when dumb users create a Page and/or a subfolder with the name “uncategorized”?

    whooami

    (@whooami)

    Member

    I have no idea 😛 and Im not going to fret over that 🙂

    Ideally, someone that wants to do that needs to understand the greater implications.

    Testing it, writing a page with the same slug name will cause the page to load up instead of the category. Thats due to the order of the rules.

    Again though, someone that wants to do something like this ought to know the limitations.

    I agree about “one ought to know”… but they just don’t.
    My guess is one of the reasons for introducing the ‘category base’ was exactly that: to prevent dumb users to break their blog 🙂

    Hey whooami this is awesome! I would very much like to know how you made it work! And I think a few other people would be interested to know how this work over at this thread: http://wordpress.org/extend/ideas/topic.php?id=359

    Did I miss a part where you explain where the how-to is located? Or is it simply the bloggerholic.com trick you did? then I’d have to try it again cause first time I tried it on my blog editing the categories-template.php it didn’t work, it displayed 404 errors on category archive pages (the ones on “Previous Entires”..).

    If you want please contact me at charbax at-sign charbax.com and I’ll send you the $25 to help you compensate your PHP guru friend with chocolates or something.

    > My guess is one of the reasons for introducing
    > the ‘category base’ was exactly that: to
    > prevent dumb users to break their blog 🙂

    Yup I see the problem this might cause for “dumb” users who may give a page a slug the same as a category. But to make it dumb-proof, wouldn’t it be an idea to do the same duplicate slug prevention that there currently is for posts, where if a post already has the same slug it would rename it /name-2/. Then I guess a dumb-proof solution would check that no categories already have the same name or else automatically name the post /name-2/ ? What I wonder is if there are any other risks of using this type of category permalink structure? Any risk that it could be incompatibile with future WordPress versions? I wouldn’t need that dumb-proof feature, and I am not afraid of incompatibillity with future wordpress versions.. As long as I can safely also get the Google love on category permalinks that don’t have a category base.

Viewing 15 replies - 1 through 15 (of 59 total)
  • The topic ‘how could i remove word “category” from urls?’ is closed to new replies.