Skip to:

Re: Excerpts

You may want to think quite carefully about doing this, as it’s not the simplest of tasks. The key issue is that bbpress does not have the data you want at the time you want it.

Basically bb only looks into the bb_topics table to see what the latest topics are. That tells it what the last post id was, what the last poster’s name was and all that, but it doesn’t tell it what the content of the last post was. To do that, you need to grab the ids of every last post being displayed, then write a database query to get the data from bb_posts. That can (*can*) be done in a single query though I think, much as bb grabs all the topics at once, so it’s not too bad. Then you have the data and can play with it however you want.

So it takes some neat hooking and querying.

Skip to toolbar