Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bp_has_site_groups( \'type=most-forum-topics&max=6\') outside the director

@svenl77

Participant

Hi JasonG, thanks for your help.

You wrote: Here is the case breakout of the types.

Where did you find this? Do you have a function name for me?

I still have problems to bring it to work. Hire is the original function from the parent theme on the forum index page. It calls bp_has_site_groups( ‘type=most-forum-topics&max=6’ )

If I look into this function I cant find the switch case from your post.

How to use groups_get_by_most_forum_topics()??

Do you have an example?

I’m looking forwart to your replay!

<?php if ( bp_has_site_groups( 'type=most-forum-topics&max=6' ) ) : ?>

<div id="popular-group-forum-listing">
<h3><?php _e( 'Popular Group Forums', 'buddypress' ) ?></h3>

<?php do_action( 'bp_before_directory_popular_group_forums' ) ?>

<?php while ( bp_site_groups() ) : bp_the_site_group(); ?>

<div class="group-forum">
<div class="item-avatar">
<a href="<?php bp_the_site_group_link() ?>/forum/"><?php bp_the_site_group_avatar_thumb() ?></a>
</div>

<div class="item">
<div class="item-title"><a href="<?php bp_the_site_group_link() ?>/forum/"><?php bp_the_site_group_name() ?></a> (<?php bp_the_site_group_forum_topic_count( 'showtext=true' ) ?>, <?php bp_the_site_group_forum_post_count( 'showtext=true' ) ?>)</div>
<div class="item-meta desc"><?php bp_the_site_group_description_excerpt() ?></div>

<?php do_action( 'bp_directory_popular_group_forums_item' ) ?>
</div>
</div>

<?php endwhile; ?>

<?php do_action( 'bp_after_directory_popular_group_forums' ) ?>
</div>
<?php endif; ?>

Skip to toolbar