Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Maeve Lander

    (@enigmaweb)

    It should be possible – you could create a text widget then place the shortcode within it.

    Thread Starter [email protected]

    (@tdavisdevelopmentgatewayorg)

    Thanks, I did try that to no success. Is there other code that would need to go with it for that to work?

    Plugin Author Maeve Lander

    (@enigmaweb)

    I noticed this older thread and thought I’d post the solution here for any others that come across it…

    Yes you can use use this in a widget
    Just place the shortcode into a text widget. If that doesn’t work (it just renders [logo-slider] in text) then that means your theme isn’t ‘widgetized’ which you can fix easily by adding 1 tiny piece of code to your theme functions.php:

    add_filter('widget_text', 'do_shortcode');

    Add this code above to fuctions.php between the <?php and ?> tags. A good place would be either at the very top or the very bottom of the file. Once you’ve done this you should be able to use shortcode in widgets now.

    I tried to widgetize my theme, but it says I cant save the functions.php.
    Any idea how I should solve this problem?
    Thank you!

    Plugin Author Maeve Lander

    (@enigmaweb)

    If you can’t save functions.php there is probably a permissions issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can this work in a widget?’ is closed to new replies.