Home › Forums › ACF PRO › Get siblings via parent relationship. › Reply To: Get siblings via parent relationship.
Hey @tanmccuin, I’m facing a very similar issue here, almost 4 years later 😛
I’m building a portfolio site for a video producer company. Directors and Videos are CPTs, and director’s page displays the videos linked to them via relationship field. I call these videos using the WP_Query method.
The video page might show the current video but also the previous and the next from that previous loop. So I reach your thread and things look basically the same.
Unfortunatelly, I’m not getting the same result as you 🙁 Could you give some help?
My single-video.php
file has this piece of code, same as yours:
$args = array(
'post_type' => 'director',
'meta_query' => array(array(
'key' => 'director-video',
'value' => '"' . get_the_ID() . '"',
'compare' => 'LIKE'
)
));
$getmysiblings = new WP_Query($args);
When I print_r
or vardump
the $getmysiblings
, the result is an error. What am I doing wrong?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.