how could i remove word "category" from urls?
http://mysite.com/category/mycategory/mypost.html
i want urls to be:
how could i remove word "category" from urls?
http://mysite.com/category/mycategory/mypost.html
i want urls to be:
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!
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.
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/
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.
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.
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"?
I have no idea :P 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.
I have too this problem... Good ideas, thank's
[sig moderated]
So whooami, are you keeping us updated as to when this solution will be available to us eigther through a how-to description or through a plugin which you said you might release?
charbox,
I have to revisit something with you ...
In the process of doing this I have become confused ..
on 2 seperate servers, 2 fresh installs, if i go and immediately set my permalinks to custom: /%category%/%postname%/
I do not get a permalink url with the word 'category' in it.
I understand that the category archives still contains that word -- however the permalinks do not.
Can you, or someone else confirm this behaviour?
the plugin is done.
Hi, I'm looking forward to your plugin for this.
About /%category%/%postname%/ - The way it works as far as I've tested, is it puts the category of the post with the highest ID number (in case the post is in more than one category) in there instead of %category%.
Does that have something to do with the way you are removing the category base in the category and category archive permalink structure? I guess it doesn't..
I'm looking forward to using your solution.. I've been looking for it for a while. I wonder if your solution is so reliable, maybe it could be included in a future WordPress release. And then all future wordpress sites may get the choice to remove that /category/ base for their category permalinks, which I think would make the blogs look more profetionnal for certain type of blogs. Cause you don't see microsoft.com or bankofamerica.com having /category/ in their URLs, so why shouldn't we also be able to build interactive websites with clean and short URLs for category listings.
I dont need long answers, please :(
Im saying this, on two different boxes:
Using this: /%category%/%postname%/
I do NOT see the word /category/ in the permalink.
Im talking about BEFORE using any sort of hack or plugin to change anything.
--
and for the record, no this wont ever be included in the core -- I can assure you. Besides which, wp-chunk is much more useful.
Well yeah, the default /category/ base only shows up in the categories permalink, not the posts permalink..
It's just the categories permalink we want to fix here isn't it? Or else I don't understand what you are looking for me to test.
Looking forward to using your release that fixes category archive permalinks.
oke, thats what I wanted to hear,thanks :) we are working out one last bug -- I had the post done, and then we discovered something that needed fixing. :(
In 2.3 cats become tags n'est pas?
this plugin was *sort of* put on hold temporarily -- mainly because when dealing with parent/child categories while we have managed to work out the rweriting for the permalinks and archive views, we are now having to rewrite the feeds for the categories - an well, its sort of a pain in the ass.
Its worth noting, though, that I do have a working copy for anyone that is NOT using parent/child categories
Yes please, I am not using parent/child categories.. Thanks a lot for releasing this.
Yes please, I am not using parent/child categories.. Thanks a lot for releasing this.
work on this has stopped, and wont continue, for several reasons.
This topic has been closed to new replies.