Get related custom post by specifics custom post ID

Question

I created two custom posts, one is formations and the other is Technologie.
The relation between both is one formation have one or many technologies.

After that, i have created a form where i select one to three technologies.
I know that to display the list of custom post type is like this :


$args = array(
        //'post__in' => array(8136),
        'post_type' => 'categories',
        'posts_per_page' => 20
    );

    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
        print '<strong>' . the_title().'</strong> <br>';
        //the_excerpt();
    endwhile;

    wp_reset_postdata();

So my question is how to display this list only for the custom post id ‘1234’ ?
PS : the custom post ‘1234’ have multiple technologie and not all !

Thanks!

0
Mohamed Amine Landolsi 3 months 2021-05-09T16:48:43-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse