Cant get bp_has_members() parameters working when using a variable
I’m trying to showcase 6 random members on my homepage, while showing all members in the members directory.
I’m using this code to change the number when its on the homepage. Which seems to be working fine.
$dm_number = 6;
$dm_number = 20;
but when I use the variable in bp_has_members() is doesnt work, it does work if I replace the variable with 6 though. The random parameter isnt working either.
`if ( bp_has_members(“include=$filtered_users&max=$dm_number&type=random”) ) : ?>`
I’m using the latest BP & WP, running on localhost – lamp environment. I’m also using this plugin for sorting out user types – http://wordpress.org/extend/plugins/buddypress-user-account-type-lite/ this is why `include=$filtered_user` is being used.
I’m still getting my head around PHP and its been a while since I’ve used BuddyPress, I think my syntax is ok but I cant be sure! Any help would be appreciated.
You must be logged in to reply to this topic.