Hello rezon8dev,
You can find the hooks and some examples in
http://dontdream.it/bp-profile-search/custom-profile-field-types/
Should you need more help, don’t hesitate to ask!
Hullo @andrea Tarantini,
I am extending this thread because I think I am in quite the same situation as @rezon8dev used to be.
I’ve followed your very neat tutorial for validating custom field types with BP Profile Search but I can’t seem to get it work. Turning to you for some advice hoping you can be so kind and lend a hand.
I installed BPPS together with BP Xprofile Member Type Field plugin by WPDEV, which adds a new dropdown select field in the X profile set, so that members can choose their member type upon signup.
At first BPPS returned a BP Profile Search: don’t know how to display the membertype field type, where membertype is the name of the field created via Xprofile Member Type Field plugin.
After following your tutorial, the error message has turned to BP Profile Search: don’t know how to display the select field type where select is the field type I substituted to textbox in your example. Namely I wrote:
add_filter (‘bps_field_type_for_query’, ‘my_hook7’);
function my_hook7 ($field_type)
{
if ($field_type == ‘membertype’)
{
$field_type = ‘select’;
}
return $field_type;
Any help will be very welcome. Thanks in advance.
Hello Prangesco,
I’ve been working with the authors of BP Xprofile Member Type Field to make our two plugins compatible, and I think they are going to add their part of the compatibility code to their next release (I’ve already added my part to BP Profile Search 4.3).
In the meantime, if you wish I can send you the proposed modifications to BP Xprofile Member Type Field so you can test them (use my Contact page to get in touch).