BP Profile Search › Compatibility with plugin "Verified Member for BuddyPress"
-
AuthorPost
-
Michael
GuestHi Andrea!
Would be nice for search compatibility with plugin “Verified Member for BuddyPress”
eg. a checkbox on search form : “Show Verified Members Only”
Any possibility of this?
Thanks!
andrea
Plugin AuthorHi Michael,
The verified status is stored in the usermeta table with key bp_verified_member.
So you can add this code to your bp-custom.php file:
add_action ('bps_usermeta_keys', 'add_more_keys'); function add_more_keys ($keys) { $options = array (1 => 'Verified Member'); $keys['bp_verified_member'] = array ('text', $options); return $keys; }For additional information you can read:
Michael
GuestThanks Andrea!
Unfortunately the Verified Members plugin was conflicting with Shortcodes Ultimate plugin on my site (specifically the tooltips function) so I had to disable VM until that issue can be resolved.I will try your code as soon as possible.
Many thanks for your great support, as always.
andrea
Plugin AuthorYou’re welcome! Please let me know when this issue is resolved.
Michael
GuestApologies for delayed update, VMfBP say they don’t know how to solve the conflict with Shortcodes Ultimate plugin, and Shortcodes Ultimate have not responded to my request for assistance. So, for now, I’m not using VMfBP.
andrea
Plugin AuthorNo problem Michael, thank you for the update!
Michael
GuestAndrea, just an update:
The conflict between Verified Member and Shortcodes Ultimate was resolved (thanks guys!) and so I’ve tested VM with BP Profile Search using the code snippet you provided, works great!
Question: I currently have a form with the VM filter displayed as drop-down selectors (blank/verified/unverified) using the “is” setting.
It’s a little confusing for users, I would much prefer a single checkbox with text alongside “Show Verified members only?”, the functionality being: box left unchecked then all members are shown, box checked then only verified members shown. This would be a much simpler and cleaner interface for users.Can this be achieved?
To be clear, I don’t want to use the “is one of” setting as this displays multiple checkboxes – again, confusing for users.
Thanks for any advice.
Michael
Michael
GuestFurther to my question above : if I use the “is one of” setting, this displays two checkboxes (verified/unverified). Could the 2nd of these checkboxes (unverified) be hidden (CSS?) …? This would achieve approximately what I want, I think.
andrea
Plugin AuthorHi Michael,
Using the code provided above, and the ‘is one of’ filter, only one checkbox should be displayed, like this:
bp_verified_member X Verified MemberIf you wish you can change the text ‘bp_verified_member’ in the search form admin, and the text ‘Verified Member’ in the code above, so you can fully customize the field, for instance:
Show Verified Members Only X YesMichael
GuestAndrea,
Thanks for your help.Following further checks…
My error:
When adding the extra form field in WP Admin, I had selected an option from “Users data” (Verified/Unverified) instead of the correct option from “Usermeta data” (bp_verified_member).All corrected now, all functioning as you describe.
Thankyou!
andrea
Plugin AuthorYou are welcome, Michael!
-
AuthorPost