Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

I want to get shortcode working in the sidebar...


  #1  
Old Apr 22, 2010, 10:12 PM
Velma
 
272 posts · Feb 2009
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
  #2  
Old Apr 23, 2010, 07:22 AM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Apr 23, 2010, 10:00 PM
Velma
 
272 posts · Feb 2009
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
  #4  
Old Apr 23, 2010, 10:06 PM
Velma
 
272 posts · Feb 2009
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
  #5  
Old Jul 9, 2010, 08:36 AM
gaidin
 
21 posts · May 2010
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
  #6  
Old Jan 9, 2011, 10:30 AM
mythical54
 
9 posts · Nov 2010
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
  #7  
Old Jan 9, 2011, 07:52 PM
juggledad's Avatar
juggledad
 
23,655 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I don't see anything on the sidebar of that link that looks out of place.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Sep 28, 2012, 08:05 AM
cantplay
 
14 posts · Aug 2012
Quote:
Originally Posted by gaidin
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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to add shortcode to a sidebar widget JakeThePeg Sidebars & Widgets 3 Sep 14, 2009 11:42 PM
Adding shortcode in custom template paulae Plugins & Atahualpa 1 May 21, 2009 04:20 PM
How do I enter shortcode? LemBook Sidebars & Widgets 8 May 17, 2009 06:40 PM
Quick question regarding shortcode/snippet in header chirop Plugins & Atahualpa 0 Mar 24, 2009 11:16 AM


All times are GMT -6. The time now is 12:41 PM.


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