Removing category base form links messes up the parent-child behavior

Cross posted from here for better visibility.

I am using the ‘standard’ trick for category removal in wordpress. In my permalinks I set the permalinks structure to

Read More
/%category%/%postname%/

And my category base to

.

Which worked fine, until the client said he wants parent categories to appear in the header of the article, and the child categories to show in the footer of the articles on the home/index pages…

I’ve set it up, but the problem is that my child categories links are now:

http://www.example.com/./parent_category/child_category

And when I click the child category, I get sent to the latest article.

I’ve tried to add in my .htaccess

RewriteRule ^category/(.+)$ http://www.example.com/$1 [R=301,L]

But this did nothing.

Now all this works, when I remove the dot, but then my links look like:

http://www.example.com/category/parent_category/child_category

And client explicitly doesn’t want category/ in the link…

Other than installing a plugin, what can I do? How to sort this? Can I have

http://www.example.com/parent_category/child_category

As my permalink, and if so how to achieve this?

EDIT

This plugin seems to fix the issue, but it would be great if I didn’t need 3rd party plugin for this :

Related posts