是否有办法在与body_class()类似的div中回显自定义帖子类型或分类法类型; ?
我想 回顾对象的ECHO CUSTOM TAXONMY
<div class="sideBarForms">
<?php
$posts = get_field('forms');
if( $posts ): ?>
<?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
<?php setup_postdata($post); ?>
<div class="***ECHO CUSTOM TAXONMY OF POST OBJECT BEING QUERIED***"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<?php endforeach; ?>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
<?php endif; ?>
</div>