add_shortcode support in Widgets
It would be great if there was a checkbox on a widget that would enable it to recognize shortcut code from plugins.
An example is
[CSSBUTTON target="http://www.linktarget.com" color="000000" textcolor="ffffff"]Button Caption[/CSSBUTTON]
The above code is from the WP CSS Button plugin
Adding this to your theme's
functions.php should work:
add_filter( 'widget_text', 'do_shortcode' );
I'm undecided on whether this should be allowed in widgets by default yet.
Enables the SyncFu group buying widget on all pages.
This plugin adds the SyncFu widget to your wordpress blog.
It requires an active SyncFu.com account.
For more information visit: SyncFu
For any questions or issues, please visit: SyncFu Support
syncfu directory to the
- Activate the plugin through the 'Plugins' menu in WordPress
- In the settings (Admin > Settings > SyncFu), enter the 40 character API key provided in the SetUp or Account Settings tab of SyncFu merchant interface
- While logged in at http://www.syncfu.com, create offers and afterwards paste the given button codes where desired in your wordpress.
Settings panel with SyncFu installed.
SyncFu settings page.
The filter method works but is very onerous. Going forward I find myself using widgetized sidebars for everything, and having shorcodes in there just makes sense!
Having a setting for shortcode parsing in widgets would mean that plugin devs don't have to create a widget, they can just give a shortcode that doesn't break as a shortcode in text widgets!
I don't think making shortcodes work by default in widgets will hurt very many people due to the content already in their widgets, and for all future text widgets it will be very very useful.
If shortcode parsing isn't the new default then there should be a setting to make them work. Logically it would belong with the checkbox for paragraph parsing on each widget. Personally I think having a setting deeper in WP would make more sense, as setting this for a whole site will almost always be a possibility.
RSS feed for this topic
You must log in to post.