Custom post type category returns null

Question

I created a CPT with CPT UI and register a taxonomy for my CPT.

I get all of this post type

<?php 

$args = array(
'post_type' => 'market',
'post_status' => 'publish',
'posts_per_page' => -1    );              

$the_query = new WP_Query( $args );
if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : 
$the_query->the_post(); 
?>      

everything works fine but <?php the_category(', '); ?> returns null.

where is the problem?

0
, Sina Maafi 4 years 2019-11-03T06:20:20-05:00 0 Answers 69 views 0

Leave an answer

Browse
Browse