Home › Forums › General Issues › Best way to use ACF in Artist/Artworks relationship › Reply To: Best way to use ACF in Artist/Artworks relationship
In I might actually make the series post a child of the artist post.
On the artwork post I would have select field for artist. I would hand code the bidirectionality of this field with a field on the artist page.
I would have a second field that is dynamically populated with the series based on the artist selected. This would likely be a select field using something similar to this https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-select-example.
Then you can do a meta query to get posts from works that match both the artist and their series. Using series as a child of artist you can also get all of the series by an artist by getting child pages or you can easily get the artist for any series by getting the parent post.
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.