Leave a Reply

1 comment

  1. If I understand the question you are trying to show both post on single.php something like this should work as a second loop.

    Put This INSIDE the first loop. Do this so you can get the current post ID

    $parent_id=the_ID();
    
    // Second Loop
    $query = new WP_Query( array ( 'post_type' => 'TYPE1', 'meta_key' => $parent_id ) );
    
    while ( $query->have_posts() ) : $query->the_post();
    //normal loop stuff such as the_content();
        echo '<li>';
        the_title();
        echo '</li>';
    endwhile;