I’ve got three custom post types: poem, author and collection.
Relationships are set from the poem CPT: every poem has an author and a collection relationship field.
I’m now trying to access from the author page every poem written by him/her through a ‘meta_query’, like this:
The problem is that author is a relationship field that will return an object. I would like to compare the ‘author’ custom field’s name or id to a value, but I would need to get the name/id value from the first element of the ‘author’ array.
I hope I have managed to succesfully explain my problem.
That said, does anybody know how I could do that or if that’s even possible?
(I’ve thought about a custom SQL query but I couldn’t find a way)