Feature Request: Shortcodes in Widgets
It's a short bit of code that increases the number of plugins you can use and it saves you from having to find as many plugins with widget options.
You do have to add it to functions.php which is why I'm putting it in as a feature request http://www.wprecipes.com/how-to-add-...idebar-widgets All you add is: Code:
add_filter('widget_text', 'do_shortcode'); |
I can't be sure but I suspect WordPress has reasons for not allowing this by default. You can alternatively use this plugin.
|
I simply cannot get shortcodes to work in sidebar text widgets.
I'm trying to call [highslide] plugin from text sidebar widget (or advanced text widget - tried both). I've tried adding: add_filter('widget_text', 'do_shortcode'); to functions.php I've tried using advanced text widget and numerous other plugins to enable shortcodes in text widgets without luck. I'm guessing it's a plugin conflict somewhere. Using WP 3.02 and Atahualpa 3.4.9 Anyone clues very gratefully received. Nick |
Wordpress doesn't process shortcodes in text widgets. Try this, add
HTML Code:
<?php add_filter(‘widget_text’, ‘do_shortcode’); ?> |
Also see post #2
|
Quote:
Also tried various plugins but all I get is the shortcode being displayed [shortcode]blah blah blah[/shortcode] as plain text. Very frustrating for something I'm thinking should be simple to implement. I'll keep experimenting. Thanks, Nick |
Highslide uses a tag (<highslide>) not a shortcode ([highslide])
|
Quote:
which uses a shortcode [highslide] if I want to use HTML in my popup - see near bottom of linked page. |
Since the sidebar shortcode plugin always worked before I unfortunately assumed it would work with this so I installed Highslide 4 WordPress Reloaded and found out like you that it didn't so I tried what is fast becoming my favorite way to create sidebar content.
I use the Spectacu.la Page Widget plugin. you just create a page with the Highslide shortcode in it. Then you go to Appearance>Widgets and add the Spectacu.la widget to the sidebar and point it to the page you just created. Worked great for me. |
Quote:
|
The good news - it worked :)
The bad news - highslide crashes/corrupts pages and posts if the content to be 'highslided' is more than 500 or so words :( So I'm still searching for a 'popup' plugin that will show the heading and body content of a page/post when the user clicks a link in my sidebar. However I do love the Spectacu.la page plugin! Nick |
What was the code you used for highslide to open a page in a window? Have you tried shadowbox js. It will open a url in a modal window.
|
I use the extra plugin "Shortcodes in Sidebar Widgets" to solve this problem. It works in the background once installed.
ATA 3.6.4, WP 3.1 |
|
All times are GMT -6. The time now is 08:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.