I’ve a custom post type ‘project’ and two custom taxonomies ‘customer’ and ‘industry’. Each ‘Project’ gets a ‘customer’ assigned whereas each ‘customer’ gets assigned to an ‘industry’. So far so good.
Now I’m trying to list the terms for the projects with the_terms(). WordPress will list all ‘customer’ but not ‘industry’. The count of each industry in the backend also doesn’t get raised when I assign an industry to a customer. This has obviously something to do with nesting the taxonomies. The setting ‘Save Term’ in the ACF Taxonomy field also doesn’t change that behavior.
I would probably have made customers a custom post type, with projects related to customers and customers being in an industry, that would come with its own set of problems.
saving and loading terms won’t work because in WP, terms can’t have terms.
The way you’re doing in is that you’ll need to get the list projects, get the customer terms and then loop through them to get the values from the ACF industry taxonomy field on each customer term in order to display them.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
ACF PRO’s Flexible Content field allows you to create smaller pieces of UI and compose them into whole flexible patterns. In our latest article, we show how to use it to create swappable site sections and integrate it all in a theme.https://t.co/ZRocH8oJSp