I have 2 post types:
book
book-series
I have created a relationship between the two so I can display the related books on the book details page based on the series they are in but when I query it I can only return the book-series. If I try to display the list of books I get nothing returned. I've tried using the sample code on the Meta Box help docs site, via a Meta Box View, and using a Oxygen repeater which normally works but none of these methods work.
Here is the code from my View:
{% set relationship = attribute( relationships, 'books-by-series' ) %}
{% for post in relationship.to %}
1, {{ post.title }}
{% endfor %}
{% set relationship = attribute( relationships, 'books-by-series' ) %}
{% for post in relationship.from %}
2, {{ post.title }}
{% endfor %}
The first one returns the book series, the second on returns nothing. Any suggestions what could be the issue here?