How to change permalink structure for custom post type and it’s taxonomies?
Ok I think I might have a solution. I have no idea if this is the right way to accomplish this, but as for now it’s the only thing that seems to work. add_filter(‘rewrite_rules_array’, ‘mmp_rewrite_rules’); function mmp_rewrite_rules($rules) { $newRules = array(); $newRules[‘portfolio/(.+)/(.+?).html$’] = ‘index.php?project=$matches[2]’; $newRules[‘portfolio/(.+)/?$’] = ‘index.php?project_category=$matches[1]’; return array_merge($newRules, $rules); } add_filter(‘request’, ‘mmp_rewrite_request’); function mmp_rewrite_request($vars) … Read more