Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Hot topics in sidebar
Avatar
boborg
Member
sp_UserOfflineSmall Offline
Aug 9, 2012 - 3:41 am

I have tried putting the shortcode [sp_HotTopicsTag] inside a text sidebar widget. But no topics are shown only the shortcode. 

I do have the Template Tags and Widgets plugin installed and activated.

Any ideas?

Best regards
Bo

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2012 - 4:26 am

I am not big on shortcodes or widgets but isn't the whole idea of a text widget the fact that you can include program code? So do you not have the wrap the shortcode in both php tags and a do_shortcode() call or something? I will need to look that up on the WP codex...

By the way - I was hoping you were going to come back to me on the tinymce/ipad question...?

andy-signature.png
YELLOW
SWORDFISH
Avatar
boborg
Member
sp_UserOfflineSmall Offline
Aug 9, 2012 - 5:44 am

The shortcode does also return anything when placed on posts. 

Have replied on the other topic now btw.

Best regards
Bo

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2012 - 6:13 am

Curious, Try the tag in the text widget if you would. We use it here (on our footer below) and we use:

<?php sp_HotTopicsTag('limit=6'); ?>

which, as you see, is working...

andy-signature.png
YELLOW
SWORDFISH
Avatar
boborg
Member
sp_UserOfflineSmall Offline
Aug 9, 2012 - 8:12 am

No go in a regular text widget but I have had success now with the Linkable Title Html and Php Widget by PepLamb plugin from wordpress.org

Best regards
Bo

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2012 - 9:01 am

Yes - I think actually you need something like the php-exec plugin working to use the code in tex widgets as well so it sounds like this plugin offers something similar.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2012 - 9:40 pm

correct... shortcodes were designed in wp for pages and posts...  and text widgets dont support php...  nothing to do with sp - this is wp...

so to use template tag or shortcode in widget, you need a wp plugin that allows shortcodes or php in text widgets...  with the latter, you can use either shortcodes or template tags...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626