0

I have two custom post types, one is “maker” and the other “product”. (used ACF plugin)

I have a taxonomy field for Business Name, this field is called “choose_business” in the product custom post type, and “business_name” in the maker custom post type.

On my product post I am wanting to display my content template for the “maker” that made it. I have this so far but it is just showing all the makers:

$biz = get_field('choose_business');


        $loop = new WP_Query( array( 'post_type' => 'maker-profile', 'business_name' => $biz ) );
               if ( $loop->have_posts() ) :
               while ( $loop->have_posts() ) : $loop->the_post();
                   get_template_part( 'content', 'maker-profile') ;
               ?>


               <?php endwhile;
               wp_reset_postdata();

I am a beginner at php and wordpress php, and i think the answer is something simple, but I keep going around and around in circles.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.