Support

Account

Home Forums General Issues how to add category slug to permalink Reply To: how to add category slug to permalink

  • Yes, this is doable, but it requires a bit more than ACF alone. First, your custom post type needs to be registered with a custom rewrite slug that includes a placeholder, for example project/%project_category%. Then you hook into post_type_link to dynamically replace that placeholder with the actual taxonomy term slug assigned to the post. You’ll also need to flush rewrite rules once (by resaving permalinks). ACF only stores the taxonomy selection; WordPress rewrite rules handle the URL logic. As long as each project has one primary taxonomy term, this approach works reliably.