Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show taxonomy description on wordpress

I'm making website about movies. Taxonomy is using to for a cast. For example:

enter image description here

Cool yeah? :D But i want to show the description on this page. I'm talking about this: enter image description here

How to make it? Here is a code of 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(); ?>
like image 654
dawidurusek Avatar asked Mar 07 '23 08:03

dawidurusek


1 Answers

That should work with <?php echo term_description(); ?>

see also https://codex.wordpress.org/Function_Reference/term_description, where you can also read about the two optional parameters $term_idand $taxonomy

like image 116
Johannes Avatar answered Mar 30 '23 10:03

Johannes