Site logo

Archived topic

Generatepress Navigation Search with Beaver Themer

10 replies · Started by Former User on August 9, 2017

Viewing posts 1–11 of 11

Hello,

I am using Generatepress with Beaver Themer, and the latter "overwrites" primary navigation settings done via theme customization.

I would like to include GeneratPress's navigation search in the primary menu.

On the Beaver site they suggest the following for pulling in the search with Beaver Theme:

Add this to functions.php:

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

Then add an HTML element and put in shortcode next to the primary menu.

Would this work with GeneratePress too?

I guess FLTheme::nav_search(); is the Beaver Theme function, what function do I have to call with GeneratePress?

Hi there,

Can you try get_search_form()?

Let us know.

I tried it out, the server then returns an internal error 500.

Strangely, nothing is logged to the error logfile, even though I have
define('WP_DEBUG', true);

in wp_config.php.

I managed to turn on error logging and just had a syntax error ;))

I have a search bar now (a form input box with "search" written inside) - how can I style it like in Generatepress Theme - with the icon and the dropdown?)

Thanks :)

The actual GP navigation search can't be duplicated outside of the GP nav without some considerable custom programming.

Why not just use the GP navigation? You could turn it into a shortcode so it can be placed anywhere?

it worked, thanks :))

You're welcome :)

Hi Tom,

I have the same problem. I'm using Beaver Themer to replace the header and footer of a site, but the Beaver Builder / Beaver Themer menu widget doesn't have a search feature.

Why not just use the GP navigation? You could turn it into a shortcode so it can be placed anywhere?

I didn't know this was possible. Is there an existing shortcode I can use, or do I have to code one into my functions.php?

Thanks

Awesome!!! Thanks!! :)

You're welcome :)

This archived topic is closed to new replies.