Home › Forums › ACF PRO › Select from and amend Taxonomy fields from Relationship or Post Object item › Reply To: Select from and amend Taxonomy fields from Relationship or Post Object item
With a bit of work that could be done, I suppose. Actually, I was just about to look into that as well for a similar case, but have not come around to it yet.
The idea is to create a custom Text field for
Creator, that is hidden from the post edit screen by contradictory logic, such as: “Show only if another random field contains any value and contains no value at the same time.” Then we would hook into the post edit screen whenever a post is saved, check if it is a
Project, iterate the Repeater, fetch each
Creator mentioned, and save the data in the hidden field as JSON, so on the
Creator template it suffices to
get_field( 'hidden_text' ) and unpack the JSON without querying the
Project post type.
It would cause a bunch of additional database queries every time a post is saved, but that is trivial, especially if the alternatives are to either cause a bunch of additional database queries every time the front-end is called, or do it all manually and go insane.
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.