• Resolved Matt Cromwell

    (@webdevmattcrom)


    On your website it seems you are using the Bootstrap shortcodes to insert buttons into the Category Description field. Shortcodes don’t seem to be working there for me. Are there functions changes I need to make to make that happen?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Matt Cromwell

    (@webdevmattcrom)

    UPDATE: I found this article (http://stephanieleary.com/2010/02/using-shortcodes-everywhere/) which gave me this code:

    add_filter( 'term_description', 'shortcode_unautop');
    add_filter( 'term_description', 'do_shortcode' );

    So now the shortcodes appear in the description fields, but not in the popup next to the category title. How do I enable that?

    Theme Author Swashata Ghosh

    (@swashata)

    Hello,

    On my website I am basically using custom HTML code not shortcodes in the category description. I will keep your suggestion in mind for future update.

    Thread Starter Matt Cromwell

    (@webdevmattcrom)

    OK, I got that to work, but it also required this to allow HTML to be used in the Category Description area:
    remove_filter('pre_term_description', 'wp_filter_kses');

    So, I’m not sure what it would take to enable shortcodes to work inside that popup, but getting them to work in the description field is easy enough. But for now, at least I have it working consistently. I just have to create the HTML by using the Bootstrap shortcodes, then copy the resulting HTML and paste it into the category description field. Supporting shortcodes would make it all quite a bit easier.

    Nevertheless. Thanks for a really useful theme.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Shortcodes in Category Descriptions’ is closed to new replies.