Hello
Please can you advise how I can create a search age range e.g. between 18-30. I had this feature before, although recently decided to remove the DOB field due to GDPR restraints. I have since changed this to user age upon registration. At the moment my advanced search only allows users to search for specific ages https://swalky.com/advanced-search.
I enquired about this on the BuddyPress support forums and they advised I add the following snippet to my ‘bp-custom.php’ file:
“<?php
//
add_action (‘bps_field_before_search_form’, ‘change_display’);
function change_display ($f)
{
if ($f->code == ‘field_4235’ && $f->display == ‘range’)
{
$f->display = ‘range-select’;
$f->options = array (” => ”) + $f->options;
}
}”
This unfortunately did not fix the issue.
Regards