Info
- 5 posts
- 2 voices
- Started 3 years ago by Clicknathan
- Latest reply from chrishajer
- This topic is not resolved
Displaying a small snippet of the most recent post
-
- Posted 3 years ago #
Would anyone perhaps know how I might display a small snippet of the most recent post in a forum under that forum's title on the front page? So, my front page might look like:
My Forum
Here is a bit of text from the most recent post in this forum
Another of my Forums
And here is some text from this forum's most recent postEtc, etc.
-
- Posted 3 years ago #
How about this as a starting point?
http://bbpress.org/forums/topic/excerpts?replies=14#post-12656 -
- Posted 3 years ago #
That's a great start, Chris - however it basically drops an entire list of recents with excerpts, and I was hoping to have the excerpt for each group listed after that group.
I'm quite the novice when it comes to PHP, but perhaps I can figure out how to mod this.
-
- Posted 3 years ago #
So here's what I found, though I wasn't personally able to get it to work myself, I'm almost positive that someone with a bit more PHP knowledge would have been able to:
This plugin: http://bbpress.org/plugins/topic/forum-last-poster/#post-1538
+ _ck_'s advice in this post: http://bbpress.org/plugins/topic/forum-last-poster/#post-1546
He details how, using
substr, you can truncate the amount of words being pulled from the any piece of content. Theoretically you could use:post_text(forum_last_topic_id());But with the truncation method he mentions. I, unfortunately, just don't know how. :(
-
- Posted 3 years ago #
Now that you mention it, I think search returns just a snippet of results, not the full post. Maybe look at how that's done?
-
You must log in to post.