Support » Fixing WordPress » How to output the term for custom taxonomy page meta description?

  • I use WordPress as cms and I couldn’t figure it out how to output the term for custom taxonomy meta description.

    So far, I was able to do this successfully in my category page using this <meta name=”description” content=”See all the latest cosmetics from `<?php $category = get_the_category();
    echo $category[0]->cat_name;
    ?>` brand.” />

    I want to do this dynamically without having to specify anything particular. I kept going back to these codes I use in my site: <?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?> and <?php $terms_as_text = get_the_term_list( $post->ID, 'color', 'Available Colors: ','','') but I couldn’t come up with something.

    Please help? thanks

  • The topic ‘How to output the term for custom taxonomy page meta description?’ is closed to new replies.