Hello, I created a ‘Projects’ custom post type using ACF. Could you help me configure its permalink structure to include the taxonomy category slug?
Current permalink: xxx.com/project/testTarget permalink: (the %category% should automatically pull the slug of the custom taxonomy assigned to the project post)
thanks!
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.