1

I want root level Wordpress urls to work for category, tag, author and archive page. For example right now categories pages are.

domain.com/category/cat-name/

it shows posts under cat-name category. But if someone visits

domain.com/category/

it shows 404 error, page not found. I want all these URLs to show some unique content created specifically for each link.

domain.com/category/
domain.com/tag/
domain.com/author/
domain.com/archive/

How can we do that?

2

It is not possible by default. Your only possible way out of this is to create custom page templates which you can modify to display something like an index or any custom content

When you create a new page in the back-end, choose this custom template, and make sure that your page slugs is named accordingly so that when you visit

domain.com/category/

that this custom page template is being displayed

  • Yes of course, we can create a page and set permalink accordingly. But will it not interfere with standard permalink structure of categories and everything else. – Robert hue Jul 30 '14 at 11:10
  • No, it will be fine to use, no problems. Remember, these base pages has nothing assigned to them, that is why they 404 by default – Pieter Goosen Jul 30 '14 at 11:14
  • Okay I tried it on a empty test installation. And it seems to be working for 'domain.com/category/' page. But if we create a subpage 'domain.com/category/subpage/' under this category page. It shows 404 error. It appears Wordpress considers it as category, whatever is after '/category/' in URL. Same applies to other too. – Robert hue Jul 30 '14 at 11:48
  • Yes, that is how it works. You cannot assign any subpage to that page, as it will break the hierarchy. Wordpress will look for the category subpage, which does not exists, that is why it 404's. I thought you just needed something to show when you go to domain.com/category/ – Pieter Goosen Jul 30 '14 at 11:53
  • Yes, you are right. I am only looking for a way to display some content on root level pages. And it's working that way. It's just that I am little concerned. That's all. :) Thanks for your explanations. – Robert hue Jul 30 '14 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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