Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created April 22, 2019 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/b420b0bc493219845a797794ab56a30e to your computer and use it in GitHub Desktop.
Save KaineLabs/b420b0bc493219845a797794ab56a30e to your computer and use it in GitHub Desktop.
Get Groups Total Count
<?php
/**
* Get Groups Total Count
*/
function yzc_get_total_groups_shortcode( $args = null ) {
if ( ! bp_is_active( 'groups' ) ) {
return 0;
}
return bp_get_total_group_count();
}
add_shortcode( 'yz_total_groups', 'yzc_get_total_groups_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment