Search in Menu Module

Hi,

I am using the Custom Menu module with the BB theme and would like a search icon at the right hand side of the menu bar. In a similar way to the search icon added via the customiser.

Is this possible please and if so how ?

Many thanks for the help

Stephen

Hey Stephen,

We don’t have a setting nor a module that would allow us to do this but it is possible to call the Search icon through the use of a shortcode. You can declare the shortcode [bb_search] by using the code below:

function bb_search_shortcode() {
  ob_start();
  FLTheme::nav_search();
  return ob_get_clean();
}
add_shortcode( 'bb_search','bb_search_shortcode' );

This goes into your functions.php file found in Appearance > Editor > Theme Functions.

You can add an HTML module right next to the menu and use the shortcode. Then you will have to style the search block using CSS to control its position.

Jun

Hey Jun - many thanks for the very helpful reply. Brilliant !

Best regards,

Stephen