So i know this has been asked countless times and there are numerous posts about it all over the internet but after extensive trial/error and research i haven't found the proper fix. Maybe one you smarties will have a solution :)

Currently i have base categories and subs
Intent is that there will be no posts in base categories but only in subs

Permalink structure is as follow : /%category%/%postname%/
With "." as prefix to remove the .../category/... slug in final link

Base category links (i.e example.com/base/) should provide all posts from all its children subs
And sub links (i.e example.com/base/sub/) will display all posts from itself

With the current setup, here is the outputted behavior :

example.com/sub/some-article (redirects to /base/sub/some-article) ✓
example.com/base (displays posts from all subs) ✓

example.com/base/sub ✘ Returns a 404 !
what does work is example.com/sub which displays the subcat.

Obviously this is because there is only one /%category%/ (adding a 2nd one just makes a mess)

Ideally i'd like to make it that going to that last mentionned link (should some silly user decided to manually visit links) redirects to desired output (example.com/base/sub). Making it impossible to be on a sub page without the base tag in link.

Any help welcome, thanks !

Your Answer

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

Browse other questions tagged or ask your own question.