I am using wordpress permalink structure in the following manner. /%category%/%postname%/ So each of my posts appear under the respective category. (Eg: http://www.bangkokbaby.com/bangkok-city/human-imagery-museum-thailand ) But when it comes to the category itself, it showing an additional folder name "category" before the name of the category. (Eg: http://www.bangkokbaby.com/category/bangkok-city/ ) Is there any way I can get rid of the folder category and place the category name directly under doamin root. ie, instead of, bangkokbaby.com/category/bangkok-city/ , I need bangkokbaby.com/bangkok-city/ Any plug-ins? Or should I use different tag for permalinks? PS: I tried to search on this board for an answer. But couldn't find. If a similar thread is already in BB, someone please tell me about that thread.
This is done so that no category has the same name as a blog post. Perhaps you can change the permalink code and get the results ? You should also look at the .htaccess file.
Thanks for the reply. But I couldn't find an answer for using differnt permalink code. Infact if I check my categories without the category directory structure, that still shows me the content in real category. But by default there are no links pointing to this page. Ie, bangkokbaby.com/category/bangkok-city/ and bangkokbaby.com/bangkok-city/ Both dispaly the same content. But the default is the first one and hence there won't be any links pointing to the second one unless I place some links to those pages manually.
OK you can change the linking structure, that I am sure about. Let me do a bit of code digging and I will tell you how to do it. I think I found some resources on this : http://jclark.org/weblog/2006/08/21/the-permalink-problem/ You can read the whole thing but the solution is near the end ...
Thanks for that maiahost. I am not really a techo person. Not sure where exactly I should place that hack.
Thanks for the reply. I am afarid I didn't convey the message properly. If I put the tag /%postname%/ , all my posts will appear directly under the root of the domian. I don't want that. I want all the posts to appear under respective category. ie, mysportsdomain.com/basketball/NBA-players, where basketball is the category and NBA-players is the post name. So far it is fine. But if I look for category it shows as, mysportsdomain.com/category/basketball/ where as I need it to be, mysportsdomain.com/basketball/ Hope I explained it better this time.
It is working. But I want the category name to appear directly under the root of the domain when I am browsing the particular category archive. Maiahost understood my question properly. But unfortunately I am not able to follow his solution.
I found a blog with an explanation on how to do this when surfing on the same problem you have .. I'll try to find it and will post the URL if I do ..
OK let me explain : this filter or 'hack' should be placed where you list your categories (sidebar.php most of the time but depends on the theme) at the very beginning of the file <?php function fix_category_links($content) { $content = str_replace('/category/', '/', $content); return $content; } add_filter('list_cats', 'fix_category_links'); ?> Code (markup): Since I haven't written it and I will be able to test it tomorrow (too much work right now) make sure you copy the file first so nothing gets broken. Good Luck