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.

Anyone knows a way of using shortcodes on terms description? This is possible?

share|improve this question

closed as unclear what you're asking by Pieter Goosen, toscho Jul 9 at 1:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

I am not sure if it's only code that is needed, but Hybrid has this filter mod for such:

add_filter( 'term_description', 'do_shortcode' );

If this doesn't work I'll try to go over code more thoroughly.

share|improve this answer
    
Thanks Rarst, Unfortunately that filter did not work... :( Cheers –  Sergio Soares Sep 17 '10 at 17:32
    
Can't find anything else... What do you get with this line added? Raw unprocessed shortcode? –  Rarst Sep 17 '10 at 18:02

I believe the following should work:

<?php
  $content = apply_filters('the_content', $content);
  $content = str_replace(']]>', ']]&gt;', $content);
?>

You could put this in the template of in a hooked functions.

I've cribbed this from here and here, where the intention is to write content from get_the_content() (raw) in an equivalent way to the_content() (amongst other things: parsed shortcodes).

Good luck!

share|improve this answer

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