Support

Account

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?