WordPress.org

Ready to get started?Download WordPress

Forums

Social Crowd
How to add shortcode to a widget (3 posts)

  1. Dave
    Member
    Posted 2 years ago #

    Hello,

    This is quite a well put together plugin. Good to see API calls have a range of times.

    One problem I seem to have. All stats in the widget are showing with no issues.

    But if I add the shortcode to a text/html widget it's not functioning.

    [SC_Stats type=feedburner]

    Are shortcodes for this plugin not supposed to work in the widgets?

    Or is there a work around?

    Cheers

    http://wordpress.org/extend/plugins/social-crowd/

  2. bdoga
    Member
    Plugin Author

    Posted 2 years ago #

    By default sortcodes are not interpreted in sidebar widgets, but if you want them to be add the following line of code into your themes functions.php file.

    add_filter('widget_text', 'do_shortcode');

    Hope that works for you.

  3. Dave
    Member
    Posted 2 years ago #

    Thanks for that. Hmmm I only need the shortcode for one entry in a sidebar so I'll have to see about the amount of work need to implement it. (it's wrapped in other code)

    As a sub note Subscribers Text Counter http://wordpress.org/extend/plugins/subscribers-text-counter/ Has short codes that allows for social numbers to appear in side bars. The only problem with this plugin is that it's not been updated in a while, doesn't have some of the options yours has, and causes some conflicts if there's a break in the API.

    It would be very good is you plugin widget would allow for some additional text as well. As it choose the social next works to add, then a field under it allowing you to add addition text/code. This is where on could put in that short code.

    Anyway, those are just ideas. It's still a good plugin and more importantly, stable!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic