Giving specific category posts its own permalink structure returns 404
First off, the add_rewrite_rule() syntax is add_rewrite_rule( ‘RegEx pattern’, ‘WordPress query string/vars’, ‘position/priority – top or bottom’ ). Now I could see you’re trying to have the following permalink structure: Structure: example.com/foodguide/<post ID>/<post slug> Example: example.com/foodguide/1/sample-food-guide But your rewrite rule (the second one in your code) does not have the proper RegEx subpattern for the … Read more