Skip to:
Content
Pages
Categories
Search
Top
Bottom

Searchable profile list with only 1 profile type


  • natelanza
    Participant

    @natelanza

    I’m trying to create a searchable list of profiles which only displays profiles of a certain type. I tried using the BP Profile Search plugin, but it doesn’t seem like it can only search a certain profile type. I also tried using FacetWP, but that doesn’t seem to do anything. Is there any way to limit BP Profile Search to a single profile type, or achieve this some other way? (I’m using the latest versions of BuddyPress and WordPress)

Viewing 1 replies (of 1 total)

  • clickallco
    Participant

    @clickallco

    Sure. You could bundle them together by using an example shown here: https://buddypress.org/support/topic/get-member-type-broken/

    Here’s the code

    function using_mt_register_member_types() {
    	bp_register_member_type('Teacher', array(
    		'labels' => array(
    			'name' 		=> __('Teachers', 'using-mt'),
    			'singular_name' => __('Teacher', 'using-mt')
    		),
    		'has_directory' => 'teachers', //url slug
    	));
    }
    
    add_action('bp_register_member_types', 'using_mt_register_member_types');

    You’d then find that particular type in your-website.com/members/type/teachers/. You can add as many types as you’d like with the above example.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar