Taxonomy
Last updated
Was this helpful?
Last updated
Was this helpful?
The taxonomy field type (e.g. ) works similar to the Post object field, but targeted on terms, allowing you to choose one or more taxonomy terms. By default, it displays title of the chosen items.
Displaying a simple term link is minimalist, but in many cases, you may want to show more details about the selected term(s). For example, besides the term's name, you might also want to display their description, and image, with the image being an ACF attached to the term.
To display term details, follow these steps:
Use the Advanced Views Pro, which allows you to customize the appearance of object fields.
Create the Primary View: Start by creating the main View, which will act as the master View. Choose the target taxonomy field as save the View.
Create a ‘Term Details’ View:
This View will be responsible for displaying term details.
In the Fields tab, select the term fields you want to display, such as the description and image (an ACF Image field).
Save the 'Term Details' View: After setting up the fields, save the 'Term Details' View.
Link the Views:
Go back to the primary (master) View.
In the Taxonomy field settings, select the 'Term Details' View in the 'View' setting.
Save the Master View: Save the master View to complete the setup.
Customize as Needed: Now, each chosen term in the Taxonomy field will be displayed according to the 'Term Details' View. You can further customize the markup and add CSS styles as needed.
That's it! By following these steps, you can display detailed term information and have full control over the layout and styling.
By default, all the items displayed in the same order, in which were selected in the field. If your taxonomy supports hierarchy, and you want to reflect it on the front, you can group the items by the parent_id field.
See the Twig template example below.
After adding the Taxonomy field to the target View, change the 'Enable Slider' option to 'Splide v4' and press the Save button. It'll automatically change the field markup to incorporate the necessary classes, and add the default JS instance:
Use a Taxonomy field to 'categorize' content. Combine it with a to query and display all items from a specific term.
Advanced Views comes with a , so you can easily turn the term items into a slider. Before activating the slider feature, read the 'displaying term details' section to learn how to setup the details look for each item.
You can customize it according to your needs, using any available .