我有一个关于CPT UI的问题,我想展示一下文章的类别,
<?php
$args= array(\'post_type\'=>\'formation\', \'orderby\'=>\'date\', \'order\'=> \'DESC\', \'posts_per_page\' => 9);
$loop= new WP_Query($args);$i=0;
if ( $loop-> have_posts() ) : while ( $loop-> have_posts() ) : $loop-> the_post();
?>
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), \'full\' ); ?>
<div class="news-container">
<div class="img-news" style="background-image: url(\'<?php echo $thumb[\'0\'];?>\')">
<div class="filtre-news"></div>
</div>
<h3><?php the_title(); ?></h3>
</div>
<?php endwhile; endif; ?>
我的自定义帖子类型名称是:formation,taxomonie是promo。。谢谢大家