Wordpress body_class();

时间:2014-12-16 02:46:03

标签: wordpress

是否有办法在与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>

0 个答案:

没有答案