Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BP Member Filter

Just installed the plugin on WP 2.9.2 + BP 1.2.4.1 and as jpl888 points out on the WP forum, it can work with a little fettling:
https://wordpress.org/support/topic/399989

To install it I added the code from the pastebin link: http://pastebin.com/bw0suXwe to my members list page (members/index.php), changed the bp_filter_profile_field(”) argument to be the name of the profile field I wanted to filter on and on testing it, I got hit with the following error in the logs:

`PHP Warning: Parameter 2 to bp_replace_members_filter() expected to be a reference, value given in snip…/wp-includes/plugin.php on line 166, referer: snip…/members/`

So I found the bp_replace_members_filter(…) method at line 265 in the plugin file bp-member-filter.php and removed the ampersand from the 2nd parameter so the method signature becomes:

`function bp_replace_members_filter( $has_members, $members_template )`

After that filtering works for me where the profile field to filter on is a select box. Filtering on a multiple select box does not work for me, and as posted earlier filtering on checkbox profile fields is not yet implemented.

Be warned though, I just checked the error log and removed the ampersand from the param and it then worked, I don’t know if that change will have any other side effects. I can see that it means I’m telling PHP that the method now expects a value rather than a reference, and that appears to be what BP is giving it, but beyond that…

Skip to toolbar