在 wordpress 上显示分类描述

daw*_*sek 4 php wordpress taxonomy

我正在制作关于电影的网站。分类法用于演员表。例如:

在此处输入图片说明

酷是吗?:D 但我想在此页面上显示说明。我正在谈论这个:在此处输入图片说明

如何制作?这是taxonomy.php的代码:

    <?php get_header(); ?>

<div class="module">
    <?php get_template_part('inc/parts/sidebar'); ?>
    <div class="content">


    <header><h1><?php printf( __( '%s', 'mundothemes' ), '' . single_tag_title( '', false ) . '' ); ?></h1></header>
    <div class="<?php if(is_tax('dtquality')) { echo 'slider'; } else { echo 'items'; } ?>">
        <?php if (have_posts()) :while (have_posts()) : the_post(); ?>
            <?php  if(is_tax('dtquality')) { get_template_part('inc/parts/item_b'); } else { get_template_part('inc/parts/item'); } ?>
        <?php endwhile; endif; ?>
    </div>
<?php if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?>
    </div>
</div>
<?php get_footer(); ?>
Run Code Online (Sandbox Code Playgroud)

Joh*_*nes 5

那应该与 <?php echo term_description(); ?>

另请参阅https://codex.wordpress.org/Function_Reference/term_description,您还可以在其中阅读有关两个可选参数$term_id$taxonomy