Support

Account

Home Forums Add-ons Repeater Field Save to two taxonomies at once

Unread

Save to two taxonomies at once

  • Hello,

    I’m building up these recipe pages for a website and I’m inputting each ingredient in as a taxonomy item of a custom taxonomy I’ve created called “ingredients”. This lets me search/filter by ingredients in the rest of the site which is great for seeing which recipes use what etc.

    I’m using the repeater where each row has a taxonomy field and a few supplementary fields like quantities etc. which are used to display in the recipe pages but I want to add a checkbox in each row for “featured”. Featured ingredients will just be repeater rows that have that taxonomy selected and a True/False box checked but my question is what is the best way of queuing this?

    I don’t want to queue everything that has that ingredient and then run an IF to see if that row is featured true or false. That seems intensive and cumbersome. Is there a way to have ACF save that taxonomy as a copy into a separate new custom taxonomy so for example:

    Blooming Onion recipe would have the taxonomy “Onion” in both “Ingredients” and “Featured Ingredients” taxonomies? How can I capture that upon saving? I imagine some sort of hook could be written to do that before the post is saved?

Viewing 1 post (of 1 total)

The topic ‘Save to two taxonomies at once’ is closed to new replies.