• I’m using this code to display custom post type category description in frontend:

    <?php 
    the_archive_description( '<div class="taxonomy-description">', '</div>' ); 
    ?>

    But in admin where is the description I want to put gallery shortcode that can be displayed in frontend. How can I achieve it?

    I can’t put it directly in template file, because it should be different for each category.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Husein Yuseinov

    (@webg)

    The answer is:

    add_filter( 'term_description', 'do_shortcode' );

    to theme function file.

    Thank you for sharing the solution. It will surely help other users.

    Feel free to ask if you have any further questions or can mark it as resolved.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom post type category description to read shortcode’ is closed to new replies.