Published on May 27, 2021

Related Taxonomy Terms via ACF Taxonomy Field

Sridhar Katakam

In a recent project I worked on, the requirement was to loop through all the industries and for each industry show related markets and focus areas.

This members-only tutorial provides the details of setting this up.

CPT: product

Taxonomies:

  • industry
  • market
  • focus_area

Custom fields for industry taxonomy:

  • industry_image (Image-type with Image ID return format)
  • markets_selector (Taxonomy-type)
  • focus_areas_selector (Taxonomy-type)
"Chemicals" industry with its custom fields populated

Further more, industry content divs should be collapsed for all but the first industry by default on page load.

on a static Page on the frontend

Step 1

Set up the custom field group.

Screenshot (mirror)

ACF export file (mirror)

Step 2

Edit the Page on which taxonomy term links of market and focus_area are to be shown for each industry with Oxygen.

Add a Code Block.

Set width to 100%.

PHP & HTML:

This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $499 one-time).

Already a member? Log in below or here.

tagschevron-leftchevron-rightchainangle-rightangle-upangle-downfolder-omagnifiercrossmenuchevron-downarrow-right