How to Set Both Category and Sub-Category Level at Root. It should also obey post rule as /category/sample-post and /sub-catgeory/sample-post?
You’ll need to define your own rewrite tag, and add the tag into the permalink structure. add_rewrite_tag() to register the new structure tag available_permalink_structure_tags filter to add to Permalinks interface post_link filter to change the URL of posts Below is untested and incomplete code, but should get you pretty far. add_action( ‘init’, static function () …