I would recommend creating a custom post type of Event and then adding your ACFs to that post type (set the rule up for the field group). Use the ACF Relationship field type to associate the Event custom post type to other posts (of any post type). There is really good documentation and code examples for this in the ACF docs. (and, it’s bidirectional!)
Thanks a million, John! That did the trick!! 🙂
Hi John,
Here’s what I see in the inspector:
Daru
Thank you, John Huebner – Everything in the code provided above works as planned – except the formatting. I can’t get the field label to format to bold. I can change the value, so I know the ‘if’ statement and add_filter are all working, but the formatting part does not work. I can just add an asterisk to indicate a note has been added, but I am curious how to format within a php statement and pass it to a variable, as you did above.
Any other ideas?
OK! Thank you so much! I wasn’t aware of that behavior when passing an empty array to include.
Thanks for your very speedy response.
Hi John, The update_field documentation does not address ACF taxonomy field types. I have used the update_field() call with using the ACF taxonomy field key, but I still need to click the Update button through the admin UI in order to link the ACF taxonomy field value to the WP taxonomy value. Could you please provide a code example for taxonomy values.
$dl_ploidy = ‘field_586131d916252’;
$dl_ploidy_value = $seedlingploidy;
update_field($dl_ploidy, $dl_ploidy_value, $post_id);
using the code above, the value is saved to the correct field, and is viewable through the admin interface, but not on front end output that displays the corresponding wp taxonomy value. Once I click update on the admin post screen, the value is displayed in the front end output. Also, if I follow this call with wp_set_post terms, or wp_set_object_terms, I get the same behavior. An example would be really great. Thanks!
I would be very interested in this capability also. I am using the repeater select so the user can select labels to print. It would be really great if they could clear all and then repopulate, as that is a business need.
Thanks!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.