Location of active filters

BP Profile Search Location of active filters

  • Author
  • #12060 Reply

    Hey Andrea,

    is it possible to shift the selected bps-filters underneath the form? For me they always show up over the form, when the user is choosing some criteria etc.

    Thank you !

    #12061 Reply
    Plugin Author

    Hi Basti,

    You can add this code to your bp-custom.php file:

    add_action ('bp_before_directory_members_content', 'move_filters', 5);
    function move_filters ()
    	remove_action ('bp_before_directory_members_content', 'bps_add_filters');
    	add_action ('bp_before_directory_members_tabs', 'bps_add_filters', 20);
    #12245 Reply

    @andrea Extending on this idea, I’m using the excellent BuddyBuilder plugin with Elementor to design the BP pages. The display of the active filters is awkward with this type setup.

    I can see above how to remove the active filters from being displayed in their default location. However, is it possible to craft a shortcode that outputs the display of the active filter that could be used in a sidebar, or Elementor template?

    I’ve been going through the plugin code but nothing strikes me as obvious that I could use to create a shortcode this piece.

    #12246 Reply
    Plugin Author

    Hi Peter,

    You can call the function bps_add_filters () in your shortcode, in order to display the active filters.

    This function looks at the current search request and, if it’s not empty, displays the active filters using the relevant template.

Reply to: Location of active filters
My Information