Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to set up some permalinks for my site. Right now all the posts are under sitename.com/blog/, which is fine. But the category pages and tag pages show as 'sitename.com/blog/category/catname' and 'sitename.com/blog/tag/tagname'.

Is there a way to just skip the 'category' and 'tag' parts of the URL? As in: 'sitename.com/blog/catname' 'sitename.com/blog/tagname'

I tried leaving the optional settings (Settings --> Permalinks --> Optional) as blank for 'Category base' and 'Tag base', but they default to 'category' and 'tag', which brings me back to my previous problem.

I then tried putting 'blog' instead. It works for the categories and tags, but it then makes all the posts redirect to a 404 page. It's as if it searches for a category/tag with the name of [postname] and on failing to find one, 404s me.

Anyone having this trouble / found a workaround for this?

share|improve this question
add comment

2 Answers 2

I was messing with my permalinks today for the same reason. And i ended up with a solution that worked great.

You have to change your custom permalink structure to:

/%category%/%postname%/

In the category base field just put a period mark:

.
and your permalinks will display in this form:

CATEGORY PAGE
mysite.com/blog/category-name/

POST PAGE
mysite.com/blog/category-name/post-name/

I don't think it works for tags pages though. I tried putting "." in the tag base field the permalink is correct like:

TAG PAGE
mysite.com/blog/tag-name/

but the page returns error 404. So i guess it doesn't see the page without the default "tag" tag base.

share|improve this answer
add comment

Advanced permalinks plugin might solve your issue


advanced permalinks

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.