BuddyPress/bbPress: Forum search button CSS formatting


I need help with the CSS to center the search field and button on the BP/bbPress forum search field. Image attached.

Edit: oops... you'll need to use Support Access and go to any group/forum to see the sidebar.

Thank you!


  • Michelle Shull

    Hey James!

    It looks like this is because of screen size - the field and the search button are showing up side by side for me on my big ol' monitor. Let's try just one simple tweak first:

    .widget-area .widget_display_search input[type="text"] {
    width: 50%;

    That's 10% smaller than it was set originally, it should make the two items display side by side instead of on top of each other. If that's not quite enough, you can try bumping that down to 45%, much smaller and the text box won't be big enough, though.

    And I apparently did not have enough coffee before chat, because I forget the exact issue you were having with your menu, can you recap that here? Maybe with a screenshot?

    Thanks, James!

  • Michelle Shull

    Hey there, James!

    You would not believe how much time I've spent with Google on this one.

    According the the Intertubes, this may be unpossible. Here's what I've found:

    We can rearrange the tabs on a profile page pretty easily.
    We can hide the BP bar completely.
    We can add new links to the BuddyBar, via plugin or hard code.

    I don't think we can rearrange the items themselves, here's why.

    In the template file that controls the sort (bp-core-buddybar.php, on around line 202), it'd defined to check for a new menu item added by a plugin, then list that plugin at the bottom. So, as best I can tell, there's no page or file we can edit to switch settings to the bottom.

    function bp_core_sort_nav_items() {
    	global $bp;
    	if ( empty( $bp->bp_nav ) || !is_array( $bp->bp_nav ) )
    		return false;
    	$temp = array();
    	foreach ( (array) $bp->bp_nav as $slug => $nav_item ) {
    		if ( empty( $temp[$nav_item['position']]) ) {
    			$temp[$nav_item['position']] = $nav_item;
    		} else {
    			// increase numbers here to fit new items in.
    			do {
    			} while ( !empty( $temp[$nav_item['position']] ) );
    			$temp[$nav_item['position']] = $nav_item;
    	ksort( $temp );
    	$bp->bp_nav = &$temp;
    add_action( 'wp_head',    'bp_core_sort_nav_items' );
    add_action( 'admin_head', 'bp_core_sort_nav_items' );

    Is this a thing you can live with?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.