Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old September 15th, 2011, 12:36 PM
DogWalkingGear DogWalkingGear is offline
 
Join Date: Aug 2011
Posts: 15
Default Can I use shortcodes in a text widget?

I would like to be able to put a product into the sidebar on some pages and I would like to use the product ID to minimise how much work is needed to change it. I have done this via a shortcode in a post or page but when I tried to use a the same shortcode in a text widget I can't get it to work - is this possible?

I followed the instructions and have this working properly if the shortcode is in a page or post, but copying the same shortcode into a text widget does not seem to work
eg
In a post [DFR:Embedded 150 Pic Cube?p=491100198966992] displays as the image
In a widget [DFR:Embedded 150 Pic Cube?p=491100198966992] just shows as the text

I tried adding add_filter('widget_text', 'do_shortcode'); to my theme - no luck
for other plugins I have used the following to get the shortcode to work in a widget
if ( function_exists ('name-of-plugin-function-that-does-shortcode')) {
add_filter('widget_text', 'name-of-plugin-function-that-does-shortcode' );
}
I can't try this since I don't know the name of the function for datafeedr shortcuts.

The documentation (http://www.datafeedr.com/docs/item/185) says shortcodes are for pages or posts but it would be handy to be able to use this one in a text widget as well.

Can you let me know if what I am trying is possible or let me know the name of the datafeedr shortcode function and I'll try the second method in my theme.

Many thanks!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the text in tab youngy Questions 1 July 13th, 2011 09:11 AM
Sub Cat text not centred macfink Questions 6 March 31st, 2011 02:20 PM
Text Removal macfink Questions 1 March 29th, 2011 11:27 AM


All times are GMT -5. The time now is 01:14 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.