如何解决查看Wordpress中类别循环内的每个类别帖子
我正在使用“分类图像”插件来获取类别图像和 我想在类别图片下显示每个类别的帖子 我能做到吗?
<?PHP get_header(); ?>
<div class="page">
<div class="container">
<h3 class="page-title"><?PHP single_cat_title() ?></h3>
<div class="subcategory">
<ul class="row">
<?PHP
$cat = get_query_var('cat');
$args = array('term_args'=>array('child_of'=>$cat,'hide_empty'=>0,'orderby'=>'id'));
$terms = apply_filters( 'taxonomy-images-get-terms','',$args );
if ( ! empty( $terms ) ) {
foreach ( (array) $terms as $term ) {
echo $this_category;
?>
<li class="col-md-3">
<?PHP echo wp_get_attachment_image( $term->image_id,'detail' ) ?>
</li>
<?PHP
}
}
?>
</ul>
</div>
</div>
</div>
<?PHP get_footer(); ?>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。