andrea

Forum Replies Created

Viewing 14 posts - 15 through 28 (of 481 total)
  • Author
    Posts
  • in reply to: Users that should not appear #10681
    andrea
    Keymaster

    Hi Tasha,

    If you are using Paid Memberships Pro – BuddyPress Add On, try to deactivate it and see if the problem disappears.

    If that doesn’t work, I can take a look at your test site, see my reply above.

    andrea
    Keymaster

    You’re welcome!

    andrea
    Keymaster

    Hi Daniel,

    You can add other fields inside the same function:

    <?php
    
    add_action ('bps_field_before_search_form', 'change_display');
    function change_display ($f)
    {
    	if ($f->code == 'field_13' && $f->display == 'checkbox')
    	{
    		$f->display = 'multiselectbox';
    		$f->multiselect_size = 5;
    	}
    	if ($f->code == 'field_574' && $f->display == 'checkbox')
    	{
    		$f->display = 'multiselectbox';
    		$f->multiselect_size = 5;
    	}
    }
    andrea
    Keymaster

    Hi Daniel,

    Does your bp-custom.php start with <?php ?

    <?php
    
    add_action ('bps_field_before_search_form', 'change_display');
    function change_display ($f)
    {
    	if ($f->code == 'field_57' && $f->display == 'checkbox')
    	{
    		$f->display = 'multiselectbox';
    		$f->multiselect_size = 10;
    	}
    }
    andrea
    Keymaster

    Hi Daniel,

    You can keep the search mode ‘is one of’, and change the check-boxes display adding this code to bp-custom.php:

    add_action ('bps_field_before_search_form', 'change_display');
    function change_display ($f)
    {
    	if ($f->code == 'field_57' && $f->display == 'checkbox')
    	{
    		$f->display = 'multiselectbox';
    		$f->multiselect_size = 10;
    	}
    }

    Replace 57 with the actual ID of your field, and 10 with the desired size of your multi-select box.

    in reply to: How can I add a default min and max age range? #10670
    andrea
    Keymaster

    Hi Daniel,

    bp-custom.php is located in wp-content/plugins, but if you don’t find it you can create it yourself.

    in reply to: Location Search #10668
    andrea
    Keymaster

    Hi Michael,

    Unfortunately, while the search can be “tricked” to search in more than one field, it’s not possible to have the plugin display “the closest result” and then sort the directory based on “the closest result”.

    Both the display of results and the sorting of directories work with a given specific field, and in your case it’s your first location field.

    So the first location field is displayed and, even if you remove the display, the directory is still sorted by the distance from the first location (when you select that ordering option).

    Sorry I’m unable to help this time!

    in reply to: Location Search #10665
    andrea
    Keymaster

    Hi Michael,

    Please make sure you have this line in your members loop:

    do_action( 'bp_directory_members_item' );

    The location and distance will appear in place of that line.

    in reply to: Location Search #10663
    andrea
    Keymaster

    Hi Michael,

    Add this code to your bp-custom.php file:

    add_action ('bps_field_before_search_form', 'set_defaults');
    function set_defaults ($f)
    {
    	if ($f->code == 'field_82' && $f->display == 'distance')
    	{
    		$f->value['distance'] = 5;
    		$f->value['units'] = 'miles';
    	}
    }

    Replace 82 with the actual field ID of your location field.

    The distance is shown in the search results when you run a distance search (you need the latest version of BP Distance Search), but to sort the results by distance you have to manually select the relevant option from the Order By: drop-down.

    in reply to: Filter out users if value is null #10651
    andrea
    Keymaster

    If your field type is ‘Text Box’, you can show all the members whose field value is not empty with this shortcode:

    [bps_directory field_37_like=%]

    Does that work for you?

    in reply to: Filter out users if value is null #10649
    andrea
    Keymaster

    Hi James,

    To limit your hidden filters to a specific directory, you can use this code:

    add_filter ('bps_hidden_filters', 'my_hidden_filters');
    function my_hidden_filters ($filters)
    {
        if (!is_page('Page Title'))  return $filters;
    
        // add your hidden filters for 'Page Title' here
    
        return $filters;
    }

    Replace ‘Page Title’ with the actual title of the page where you put the [bps_directory] shortcode.

    By the way, the code you posted adds the filter only if the current user has a non-empty value in his/her own profile. Is that what you need?

    in reply to: Error message #10643
    andrea
    Keymaster

    Hello Luke,

    The BuddyBoss Platform you are using contains a custom version of BP Profile Search. I suggest the following:

    1. Make sure the standard BP Profile Search plugin is not installed; if it is, deactivate and delete it;

    2. Make sure to activate the custom version: go to BuddyBoss -> Settings -> Profiles -> Profile Search, and follow the tutorial there.

    Please let me know if that works for you!

    in reply to: Directory Shortcode not working #10641
    andrea
    Keymaster

    Hi Owen,

    I can’t find the page you mention, maybe you’ve already solved the problem?

    in reply to: Italian Translation #10628
    andrea
    Keymaster

    Bene! e in bocca al lupo per il tuo sito.

Viewing 14 posts - 15 through 28 (of 481 total)