Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 [rev_slider slider]

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' );
share|improve this question
1  
i found how to show html tag. here it is wordpress.stackexchange.com/questions/98034/… >>> i test a it is work –  Accore LTD Mar 29 at 6:41
    
You will need to explain exactly where you need to implement this and what the outcome should be. Also you will need to add the code that you already have, working or not. –  Pieter Goosen Mar 29 at 6:41
    
@PieterGoosen i edited my post. now you can understand more clearly –  Accore LTD Mar 29 at 6:55
    
i found solution .. it works nicely.. wordpress.org/support/plugin/rich-tax-description-editor this plugins –  Accore LTD Mar 29 at 7:18
add comment

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' );
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.