Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Custom Loops for Forum Topics


Burt Adsit
Participant

@burtadsit

There sure is. Kinda.

$forums = bp_forums_get_forum();
if ($forums){
foreach ($forums as $f){
.. do something with each forum like..
$topics = bp_forums_get_topics($f['forum_id'], 5);
.. do something with each topic ..
}
}

bp_forums_get_forum() returns bbpress forum records. Same info as in the bb_forums table.

See:

/bbpress/xmlrpc.php

/buddypress/bp-forums.php

/buddypress/bp-forums/bp-forums-bbpress-live.php

/buddypress/bp-forums/bp-forums-templatetags.php

The BP_Forums_Template_Forum template loop class iterates over one specific forum.

Skip to toolbar