Thanks for getting back to me!
– User selects Taxonomy term from Select
– I make AJAX call to PHP with the Taxonomy Term.
– PHP makes call to DB to get latest 4 entities that have that Taxonomy Term and send back.
– Consume response from PHP and create HTML in JS and render HTML onto the page.
The last step is a problem because from what I can see in the HTML on the admin page there is a lot of dynamic ids and attributes that are used that I wouldn’t have on my HTML because I have no way of knowing whats needed. Maybe you have some more insight there that I’m missing.
If I go the second route you suggested that seems a little more doable. My only question there is on the save_post hook I would need to make a call to DB to get the latest 4 entities and then create fields not update fields. Not sure if I can make a call to DB in that hook and also not sure if update_fields() is what I need. So I took a look into the docs more and saw add_row(). Do you think this would be better for what I’m trying to do?
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!
© 2022 Advanced Custom Fields.