How To Get Descriptions From Taxonomy Descriptions

In This Topic,

We are going to see How to get Descriptions from a custom taxonomy.
It’s very simple to get the description. WordPress provides the function for this.

Simply put the below code to your archive page. Where you display your taxonomy post, page, product.. etc.

<?php echo get_queried_object()->description; ?>

This function will return the description of your taxonomy.

If you want to get a shortcode from your description then put the below code.

<?php echo do_shortcode(  get_queried_object()->description ); ?>

this will return the value of your shortcode.

Please review the video.

Submit a Comment

Your email address will not be published.

Subscribe

Select Categories