Try:
<?php
$experts = get_users( 'fields=ID&role=expert' );
$args = array(
'include' => $experts,
'per_page' => 500 // the number of members that you have
);
if ( bp_has_members( bp_ajax_querystring( 'members' ) . $args ) ) :
while ( bp_members() ) : bp_the_member();
?>
@shanebp , thanks .. just tried, and gives the same result.
Then some code from some other plugin or theme is interfering.
To find out, try turning off other plugins and switching to a WP theme like 2015.
tried switching everything, didn’t work
http://31.216.48.18/~farmcom/
Try it with subscribers.
get_users( 'fields=ID&role=subscriber' );
If that works, then it’s a clue that there is an issue re your ‘expert’ role.
replaced the code, and its same
Try:
if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=500&include=' . $experts ) ) :
i inserted this code, and nothing showsup on the frontend expert block
<?php
$experts = get_users( 'fields=ID&role=expert' );
$args = array(
'include' => $experts,
'per_page' => 500 // the number of members that you have
);
if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=500&include=' . $experts ) ) :
while ( bp_members() ) : bp_the_member();
?>