WordPress.org

Ready to get started?Download WordPress

Forums

RSSImport
Using short code in sidebar widget (5 posts)

  1. cadfile
    Member
    Posted 2 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

    http://wordpress.org/extend/plugins/rss-import/

  2. novaclic
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 years ago #

    Yes it was the functions.php file from the theme

  4. pokinwilly
    Member
    Posted 2 years ago #

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

  5. amahou
    Member
    Posted 1 year ago #

    @cadfile,
    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

About this Topic

Tags