Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   I want to get shortcode working in the sidebar... (http://forum.bytesforall.com/showthread.php?t=6843)

Velma Apr 22, 2010 10:12 PM

I want to get shortcode working in the sidebar...
 
I've tried 3 plugins that were supposed to do this, and it didn't work. I'm going to assume a compatibility problem, and I need the plugins that are there, so I went hunting for another work-around.

Found this:

http://englishmike.net/2008/07/07/wo...idebar-widget/

It says to edit the functions.php and put some code in there.

"Find a place between the <?php and ?> tags which is not in the middle one of the functions that may already be in the file (the very top or bottom of the file are both good places) and add the following line:
add_filter('widget_text', 'do_shortcode');

So...I'm wondering where the safest place to do this is?

Can I do this somewhere in the Atahualpa Options, and not edit the functions.php? If not, where would be the safest place within the functions.php to do this?

Thanks.

Velma

lmilesw Apr 23, 2010 07:22 AM

Did you try this plugin? I haven't tested it but once installed it's supposed to allow you to add shortcode to a text widget. It may take the place of putting code in a core file which I like to avoid.

Velma Apr 23, 2010 10:00 PM

Yes, I did.

I want to add the short code form Simple WP Shoppingcart.

I know I can add the php in widget code and get the add to cart buttons in the sidebar, but I want a button with the dropdown, and it won't do that with the php code...only the short code.

I tried 3 different shortcode in widget plugins (including the one you offered), and the shortcode didn't work. :(

So I found that link I posted, and wanted to give that a try, but don't want to insert it somewhere that causes me more problems. :)

Warmly,

Velma

Velma Apr 23, 2010 10:06 PM

I don't think this other work-around will work either.

I've been posting at the plugin's forum as well. (Not a bad response time...usually around 24 hours.)

This was the response I got when I posted that a short-code plugin didn't work:

Quote:

Because the shortcode was created using a filter not a proper wordpess shortcode API (wordpress introduced it later).
Ah well. Not sure what else to do.

Velma

gaidin Jul 9, 2010 08:36 AM

Hi

I tried the 'english mike' idea and it seem to work fine.

Added
PHP Code:

add_filter('widget_text''do_shortcode'); 

just before the closing ?>

at the end of function.php

mythical54 Jan 9, 2011 10:30 AM

Am trying to do this and nothing above works.
I have VideoGall working on the pages and want to put a video on sidebar that will open with the shadowbox effect from VideGall.

I am using Atahualpa latest version.

http://www.contemporarycollegeofhomeopathy.com/

All I get is text

Anyone have any ideas

Alan

juggledad Jan 9, 2011 07:52 PM

I don't see anything on the sidebar of that link that looks out of place.

cantplay Sep 28, 2012 08:05 AM

Quote:

Originally Posted by gaidin (Post 36497)
Hi

I tried the 'english mike' idea and it seem to work fine.

Added
PHP Code:

add_filter('widget_text''do_shortcode'); 

just before the closing ?>

at the end of function.php

Thanks! This worked for me WP 3.4.2 ATA 3.7.9


All times are GMT -6. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.