I am hoping someone can help me.
I have a small project where I am creating a sort of book and comic directory.
Currently it works like this:
There is a custom post type called brand where you can create the brand for example, batman.
There is then a book/comic custom post type where you can add the individual book/comic and write a review on it as the single post.
On the brand cpt single posts, I have a repeatable field that has 2 fields within it:
– one relational post object field where the user can select a book from the book/comic cpt
– a description field to write about why they’ve selected it.
All of the above works great, the bit I am stuck on is on the book/comic single posts, I want to be able to show all the brands that particular post has been selected on via the post object field on all of the book/comic single posts.
Does anyone know how to do this or if it is possible? Sorry if the above is confusing, let me know if I need to make it any clearer.
Thanks
You would need to search the for the comic post ID in the post object field of the repeater of the brand post.
https://www.advancedcustomfields.com/resources/query-posts-custom-fields/