On my website I have a “Products” custom post type, that lists different Amazon products. There are various product categories (mouse, keyboard, monitor etc), which I differentiate using a custom taxonomy (“product_category”).
To display the products on the frontend, I use an ACF “post object” field type to select an individual product, and output them in the form of a text link. The shortcode I am using to achieve this is:
I then use [faq_product field=”FIELD_NAME”] shortcode to display the link. This is working fine, but only when the ACF post object field is set up to display a single entry.
What I would like to do is turn on ACFs “Select multiple values?” feature to allow me to have multiple products selected, and then edit the above code so it is able to display only one of these product links, based on the category I choose.
As an example, my post object field has the following products: