The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Using short code in sidebar widget (5 posts)

  1. cadfile
    Posted 4 years ago #

    I use a localhost setup for development using XAMPP where I try out plugins and do the CSS I want to change on my blogs.

    I tried out RSSImport and it worked great - used the short code in a text widget since I wanted to add more than one feed in single widget box.

    Moved it over to my production site - uses same setup theme and css as development and the shortcode didn't work. Just showed the text of RSSImport with the options as text

    Weird - have no idea why that is doing that.

    I found a solution and it only takes one line of code in the functions.php file (from: http://digwp.com/2010/03/shortcodes-in-widgets/ )

    add_filter('widget_text', 'do_shortcode');

    Now the RSSImport shortcode works as it did under XAMMP


  2. novaclic
    Posted 4 years ago #

    Hello cadfile,

    Thanks for sharing.

    To make sure I understand: you refer to the functions.php file from the theme, right?

  3. cadfile
    Posted 4 years ago #

    Yes it was the functions.php file from the theme

  4. pokinwilly
    Posted 4 years ago #

    thanks for the info, I didn't know it could be possible to use shortcodes in widgets...

  5. amahou
    Posted 4 years ago #

    Thanks a lot for sharing this. It solved my shortcode problem in text widgets.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • RSSImport
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic