I want to add a shortcode (like slider) and html tag like <h2>-------- text -----</h2>. Is that possible?

I have already tried but is not really working. Only normal text is showing, no short code or html tag even. Any idea how or not possible?

i want to use this for own theme. i have one product page. but many category (like 7) and each category will have different slideshow banner. and under there product picture and details. i don’t want make each category page separately, i can show shortcode from category description then i can it will be work for me. my shortcode will be

There is nothing to show here!
Slider with alias slider not found.

category page code

 <?php if ( category_description() ) :  ?>
  <div class="catdes"><?php echo wpautop( term_description() ); ?></div>
  <?php endif; ?>

function page

remove_filter( 'pre_term_description', 'wp_filter_kses' );

1 Answer
1

For displaying shortcodes you can use do_shortcode

<?php echo do_shortcode( term_description() ); ?>

For HTML the filter should be enough (what you posted worked on my install).

remove_filter( 'pre_term_description', 'wp_filter_kses' );

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *