Support » Theme: Frisco for BuddyPress » Modify Buddypress Search

  • Resolved codegene


    Now by default in the search bar, members option is selected. When you click on the list other options like forums,groups and post appear. I want to show posts by default in the search bar instead of members. How can i do so?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author David Carson


    This is not an issue with the Frisco theme necessarily. That functionality is inherited from BuddyPress and the bp-default theme.

    I think the function you’re looking to work with is bp_search_form_type_select() and it has a filter. Because this is not an issue with the Frisco theme, I’m going to mark this as resolved. I’d recommend searching or posting in the BuddyPress support forums.

    Thanks very much David! The issue is now resolved.

    I solved the problem by editing bp_search_form_type_select()function in buddypress/bp-core/bp-core-template.php

    I achieved it by placing the blog and posts code ahead of the members code for search bar.

    Here is the modified code:

    function bp_search_form_type_select() {
    	$options = array();
            if ( bp_is_active( 'blogs' ) && is_multisite() )
    		$options['blogs']   = __( 'Blogs',   'buddypress' );
            $options['posts'] = __( 'Posts', 'buddypress' );
    	if ( bp_is_active( 'xprofile' ) )
    		$options['members'] = __( 'Members', 'buddypress' );
    	if ( bp_is_active( 'groups' ) )
    		$options['groups']  = __( 'Groups',  'buddypress' );
    	if ( bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() && bp_forums_has_directory() )
    		$options['forums']  = __( 'Forums',  'buddypress' );

    There is plugin.

    Enjoy it! 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modify Buddypress Search’ is closed to new replies.