Remove CPT name from permalink but add %category% instead

You have to set “hierarchical” => true in order to get %category% and %subcategory% to display: “rewrite” => array( “slug” => “producten”, “with_front” => false, “hierarchical” => true ), Don’t forget to flush permalink settings by opening settings → permalinks and save. More info: WordPress Codex: Function Reference/register post type

WordPress archive permalink with leaf category

You can filter term_link to modify any taxonomy URL generated by the API. In this case, we only need the filter, as the default rewrite rules will handle this modification for the incoming requests. If you’re doing any sort of change that introduces a new URL pattern, you will also need to add new rules … Read more