I am trying to:
Display information about some products, from custom post types, where the same "thing" is also represented.
As usual I made a mess
I have two post types, "cd" and "books", because we need to present these as just publications, meaning not just in the shop.
So, we have these publications, but they are related, like a cd+book is related, like a set, but is presented both separately and as a set.
E.g.
Product: "CD Product1"
"CD Product1" is related to "cd1"
And "cd1" is related to "book1"
SEE THE 2 IMAGES POSTTYPE-RELATIONSHIPS
"book" is parent to "product" and "cd"
"cd" is parent to product (and child of "book")
When I see "CD product1" in the shop, I have tried to create a view, displaying data from the custom post type "cd", this should be data from "cd1" because I selected it to be related to the product.
(Data like design, writer, publisher, video, sound, links etc.)
But the relationships gets messed up, and I don't know if I even should have used all these post types. Maybe products should have custom fields instead.
When I look at "CD Product1" it shows me information about the book. This product isn't even set to be related to the book post type, only to the cd.
(But the product is related to the cd and the cd is related to the book)
Link to a page where the issue can be seen:
This shows the data from the CPT in the right sidebar: hidden link
But as you can see in the first line, where I output the post type, it shows data from "bog"(Book), but the product is a cd.
I expected to see:
The same, but data from the cd post type.
Thanks for your time,
Best regards
Lykke