Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Site Members Loop & Variables


r-a-y
Keymaster

@r-a-y

@dunc – If you want a global variable, then (surprise, surprise!) use a global variable or a define.

In wp-config.php or /wp-content/plugins/bp-custom.php, you can either do this:

global $my_var;
$my_var = WHATEVER;

or:

define( 'MY_VAR', WHATEVER );

Then in your page template or anywhere else, you do this:

global $my_var;
if ( bp_has_site_members( 'type=active&max=' . $my_var ) ) :

or:

if ( bp_has_site_members( 'type=active&max=' . MY_VAR ) ) :

Hope that helps.

Skip to toolbar