Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
custom-topic
Code Customization
Avatar
JanetBarclay
Hamilton, Ontario, Canada
Member
Free Members
sp_UserOfflineSmall Offline
Aug 25, 2010 - 10:21 am
sp_QuotePost Quote

We are currently using the Recent Forums Posts widget on http://www.storage-brain.com but it doesn't do quite what we want. We'd like to display an excerpt from the latest post, and I understand this can be done by editing the code, but this is beyond my level of expertise. If you can help, please email me at janet@organizedassistant.com.

Please note I am using SpamAssassin on that account, so you will need to respond to a challenge email for your message to reach me.

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 25, 2010 - 11:05 am
sp_QuotePost Quote

have you looked at the alternative 'latest posts' tag on the same wiki page (api - template tags - lists). This includes the post content already.

andy-signature.png
YELLOW
SWORDFISH
Avatar
JanetBarclay
Hamilton, Ontario, Canada
Member
Free Members
sp_UserOfflineSmall Offline
Aug 25, 2010 - 12:23 pm
sp_QuotePost Quote

I don't understand what code I need to use, or where to use it.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 25, 2010 - 9:02 pm
sp_QuotePost Quote

in your wp theme file, where you want the latest posts to appear, you would put

<?php sf_latest_posts(); ?>

that assumes its in a section of the theme file where php code is not enabled... if it is, just forego the opening and closing php tags...  there are some options you can pass if you dont like the defaults... details in the wiki..

Avatar
JanetBarclay
Hamilton, Ontario, Canada
Member
Free Members
sp_UserOfflineSmall Offline
Aug 26, 2010 - 6:22 am
sp_QuotePost Quote

Thank you - that got me started, but I am not seeing anything that explains how to include a short excerpt (3 lines) - it seems to be all or nothing.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 26, 2010 - 8:02 am
sp_QuotePost Quote

ah... afraid you are right... that tag is the whole content...  and the others are just the title... so you wouldnt need to edit the tag and apply a word count filter to the content...

Avatar
JanetBarclay
Hamilton, Ontario, Canada
Member
Free Members
sp_UserOfflineSmall Offline
Aug 26, 2010 - 8:43 am
sp_QuotePost Quote

I really don't know PHP... how would I go about doing that?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 27, 2010 - 5:14 am
sp_QuotePost Quote

You can limit this through the admin options. On the Options > Global Settings panel - top right - are the RSS settings. In there you can impose a word count on the post cntent sent out via RSS. This template tag will use that to also limit the number of words shown in the tag.
Would that do the trick for you?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2010 - 9:25 am
sp_QuotePost Quote

holy cow!  completely missed that... nice catch Andy!

Avatar
JanetBarclay
Hamilton, Ontario, Canada
Member
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2010 - 9:33 am
sp_QuotePost Quote

Thanks - we're getting there... Now, is there any way to include an avatar the way the Recent Forums Posts widget does?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17357
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10123
Posts: 79613