Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

Where does the shortcode for a custom widget go?


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Nov 16, 2011, 03:49 PM
jms5017's Avatar
jms5017
 
80 posts · Jul 2010
NY/NJ Metro area
From this thread
http://forum.bytesforall.com/showthr...dget+shortcode

It says: "Once you have created the new widget area, copy paste the shortcode [FrontpageSlideshow] into the widget."

I have a custom widget in my header area fine. Now I am trying to add the shortcode. Where the heck does the short code go? The plugin is wp-imageflow2 and the gallery has been uploaded to
wp-content/galleryimageflow2???
  #2  
Old Nov 16, 2011, 03:58 PM
juggledad's Avatar
juggledad
 
22,315 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
do you have a custom widget or a custom widget AREA? if you have a new widget area, then you need to add some widget not it. You might need a text widget in this situation
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 16, 2011, 05:18 PM
jms5017's Avatar
jms5017
 
80 posts · Jul 2010
NY/NJ Metro area
I think I have a custom widget area called my_header_widget to which I added a text widget,
then tried adding the shortcode to the text widget.
The result of doing that was the shortcode appeared on the page exactly as I entered it instead of the gallery. I've been looking on the internet and I found this suggestion from stephanie leary who writes books about wordpress.


"Shortcodes are bracketed placeholders you can use while editing your content
that will be replaced with some other, more complicated content (like an embedded video or image
gallery) when your post is displayed to visitors. Unfortunately, shortcodes are processed only in
post/page content. You can use them in text widgets, however, if you enable theme in the theme
functions as shown in Listing 6-39.

Listing 6-39. Enabling shortcode parsing in text widgets
add_filter('widget_text', 'shortcode_unautop');
add_filter('widget_text', 'do_shortcode');
The first line ensures that a shortcode placed by itself on its own line won’t be surrounded by
paragraph tags. The second line actually parses the shortcode.

I added the two lines of code to the themes functions.php file
but that didn't work either.

the images for the plugin which is wp-imageflow2 are in wp-content/galleryimageflow2
and the shortcode I tried was [wp-imageflow2 dir=wp-content/galleryimageflow2]
Help is greatly appreciated.
  #4  
Old Nov 16, 2011, 05:20 PM
jms5017's Avatar
jms5017
 
80 posts · Jul 2010
NY/NJ Metro area
site is jkstest.info
  #5  
Old Nov 16, 2011, 06:54 PM
lmilesw's Avatar
lmilesw
 
10,107 posts · Jul 2009
Central New York State USA
A shortcode cannot be natively used in the standard text widget. To use a shortcode in a widget you either need to install a plugin that "enables" that option such as Shortcodes in Sidebar Widgets or using code like
PHP Code:
<?php echo do_shortcode('[your shortcode]'); ?>
in a php aware widget such as Linkable Title Html and Php widget.
__________________
~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.
  #6  
Old Nov 16, 2011, 07:39 PM
jms5017's Avatar
jms5017
 
80 posts · Jul 2010
NY/NJ Metro area
I've installed the "shortcodes in sidebar widget" as you suggested.The gallery still doesn't show up.

How do i know if I have a "php aware" widget to attempt to try to figure out where I would insert the
<?php echo do_shortcode('[your shortcode]'); ?>
code that you suggest?

The widget area is My_header_widget.
  #7  
Old Nov 16, 2011, 08:06 PM
lmilesw's Avatar
lmilesw
 
10,107 posts · Jul 2009
Central New York State USA
The Linkable title widget I mentioned is a php aware widget.
__________________
~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.

Bookmarks

Tags
custom widget, shortcode

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Having shortcode issues, where in Ata should I look mad_science eCommerce & Atahualpa 3 Feb 11, 2011 12:40 AM
BUGFIX 361-04: Allow Custom Menu widget links to use same styling as Pages widget. juggledad Old Version fixes and change logs 1 Jan 22, 2011 09:40 AM
[SOLVED] How to add shortcode to a sidebar widget JakeThePeg Sidebars & Widgets 3 Sep 15, 2009 12:42 AM
Adding shortcode in custom template paulae Plugins & Atahualpa 1 May 21, 2009 05:20 PM
How do I enter shortcode? LemBook Sidebars & Widgets 8 May 17, 2009 07:40 PM


All times are GMT -6. The time now is 04:19 PM.


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