latest forum topics widget
-
I have bbpress/buddypress integrated and group forums working. I do not have a link to the full bbpress forums from the buddypress pages as I want users to use the forums through the groups.
However, I have noticed that new/updated topics in the group forums do not show up in the activity feed. This is probably best however, my users are asking if there could be some way a new forum topic can be displayed on the buddypress home page so that it can get more exposure.
A way to do this might be to have a widget that shows the last 5 created forum topics. Does anyone know if something like this exists already or how hard it would be to create one?
-
It doesn’ t look like Andy has documented this yet but there is a group forum loop just like other parts of bp have a loop. Look at bp_has_topics() in bp-forums-templatetags.php. It looks like I’d use that if I were you.
See: https://codex.buddypress.org/developer-docs/custom-buddypress-loops/ for examples using other bp_has_[something]() loops.
There is also Sam’s bbPress Live widget which you could use: https://wordpress.org/extend/plugins/bbpress-live/
Hmmm. Well maybe that wouldn’t work. That widget is what bp uses to communicate with bbpress for group forums. Interesting.
Thanks Burt,
Ill try the plugin first since I don’t code that well. The bbpress_live_get_forums() function might be used in bpress but Ill see if the other one can be used to show latest topics.
Nope. Can’t activate it. Well, maybe you can just register it and then use it. Hmmm. You might try that. Or just use bp’s :
function bp_forums_get_topics( $forum_id = 0, $number = 0, $page = 1 ) from bp-forums.php
It’s getting kinda fuzzy here. I gotta get some sleep.
Thanks again Burt. Just wondering, how I would get the forum id for all the group forums.
i’ve tried working with it using them as functions.. no luck.
Windhamdavid, it does not seem to be working for me either. Do let me know if you find a solution.
- The topic ‘latest forum topics widget’ is closed to new replies.