Shortcodes in widgets?

Community Forums Forums Design Tips and Tricks Shortcodes in widgets?

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  braddalton 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #41545

    Post count: 1

    I must be missing something —

    Why won’t shortcodes work in widget areas?

    For instance, in Home Top I’m trying to do 3 colums, but


    [one_third]<h2>What </h2>[/one_third]
    [one_third]<h2> Partnters</h2>[/one_third]


    doesn’t work – it comes out exactly like you see it above, except the h2 tags are huge

    Post count: 10667

    You need to firstly add support for shortcodes in widgets.

    Add this code at the end of your child themes functions.php file:
    add_filter( ‘widget_text’, ‘shortcode_unautop’);
    add_filter( ‘widget_text’, ‘do_shortcode’);


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.