Home Forums General Issues Fill in taxonomy automatically


Fill in taxonomy automatically

  • I have a custom post type “Golf” with a taxonomy “Secteur”, I also associated this taxonomy to posts.

    In my CPT “Golf” I have multiples entries (Golf #1, Golf#2 etc) with his propers terms, for example, Golf#1 has “Poitou-Charentes” for parent term and “La Rochelle” which is a child of “Poitou-Charentes”.

    What i’d like is when the author of “Golf #1” publish a post, the taxonomy attributed to “Golf #1” is automatically given to this post and same for others Golfs.

    Is it possible ?

  • If it’s because I don’t say hello or goodbye, it’s because on the forums others prefer when it’s concise, but I assure you that I’m a very nice person, by the way you are welcome at my table.

    Have a good day

  • To answer the original question, this really isn’t related to ACF.

    But what you have to do is this. When a post is created on the WP save_post hook you need to get the parent post, then get the terms of the parent post and set the post terms.

  • Thanks for your reply, I will try this !

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.