List of group forums & topics
-
Hi !
I’m havin some troubles.
I want to display avatar of each group where the user is a member.
-> DoneI want to display, if the group have a forum, a link to the forum
-> doneI want to display, if the forum have topics, few newest topics
-> need to doneActually, my code crawl the groups but is locked on the first forum and, for each group, display topics which are on the first forums.
I’m adding you my code :
while ( bp_groups() ) { bp_the_group(); echo '<a href="'.bp_get_group_permalink().'" title="'.bp_get_group_name().'">'.bp_get_group_avatar('type=full&width='.$size.'&height='.$size) . '</a>'; // si le groupe a un forum je return 1 if( bp_group_is_forum_enabled($group) ) { // si dans ce forum il y a des topics je return 1 if ( bbp_has_topics()) { bbp_topic_forum_id(); echo " Forum : " .bp_get_group_name(); <ul> <?php while ( bbp_topics() ) : bbp_the_topic(); ?> <li> <a>" title="<?php bbp_topic_title(); ?>"><?php bbp_topic_title(); ?></a> </li> <?php endwhile; ?> </ul> } else { } } else { }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.