Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Can I show latest topics or replies from a specific forum using the Template Tag shortcodes?
Avatar
Nick Bijl
Member
sp_UserOfflineSmall Offline
Sep 4, 2015 - 4:01 am

Heya,

Can I use a shortcode like [sp_latest_posts] to show the latest posts to a specific forum?

If so, how does this work? (I checked the docs but I'm still kinda lost :p)

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 4, 2015 - 4:34 am

You could really do with our Template Tags plugin (https://simple-press.com/downl.....ts-plugin/). One of the items in that is a widget for just this (see our footer area where we use this) but the same thing is also available as a template tag or short-code.

For documentation on the Template Tags plugin please see: http://simple-press.dev/docume.....gs-plugin/

andy-signature.png
YELLOW
SWORDFISH
Avatar
Nick Bijl
Member
sp_UserOfflineSmall Offline
Sep 4, 2015 - 4:58 am

Thanks for your fast reply!

I'm in fact using the Template Tags plugin, and I pasted the shortcode in my post, but I just remembered shortcodes are, of course disabled in posts, haha.

How do I get, say [sp _ newest _ topics] to show only the newest post from a particular forum?

Cheers!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 4, 2015 - 5:07 am

Well - you can pass in an argument of 'forumIds' and set that to a comma delimited list of the forum IDs you want to show.

I am not that familiar with shortcodes myself (never personally use them!) so I might need to ask @mr-papa if you can't get this working... but i am assuming you DO know how to use shortcodes! I am just a little unsure whether the argument name is 'forumIds' or 'forumids' (note the capital or lower case 'i'). One of them should be right!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 4, 2015 - 7:27 pm

[[[sp_newest_topics forumids="xxx"]]]

where xxx is the comma separated list of forum ids you want to use..

Avatar
Nick Bijl
Member
sp_UserOfflineSmall Offline
Sep 5, 2015 - 5:07 am

Awesome, thanks lot!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 5, 2015 - 5:08 am

I assume that means it worked as you wanted, Good news and you are welcome, Thanks for the update.

andy-signature.png
YELLOW
SWORDFISH
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: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625