Hi there,
does anybody know how to do this?
I have two post types that are connected through a ACF relationship.
“design” (parent post) + “item” (child post)
There are:
• 4 x “design”
• 12 x “item”
On every “design” post page, there are 12 divs (one for every “item”). I want the items that are related to a certain design to be highlighted, the other ones to be kept as they are.
Does anyone know how to do this kind of query?
Many thanks in advance!
Ok, so I solved this myself. Not in a beautiful way, but it works. I have 12 if functions to check which item(s) the design includes, like <?php if (get_the_title($design->ID) == "1001"){ do something } ?>
If you have a shorter solution, I’m open to change the code!
🙂