Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Creating Forum Widget and Links Won't Work


sclough
Participant

@sclough

Sorry, here’s repost of the code. $limit come from the widget setting how many posts can show…

global $forum_template, $bp;

if ( bp_has_forum_topics('type=newest&per_page=' . $limit) ) {
echo '<ul class="latest_form_topics_widget">';
while ( bp_forum_topics() ) {
bp_the_forum_topic();
echo '<li class="forum_topic_widget"><a href="' . bp_get_the_topic_permalink() . '" title="' . bp_get_the_topic_title() . '">' . bp_get_the_topic_title() . ' </a></li>';
}
echo '</ul>';
}

Skip to toolbar