Site logo

Archived topic

Change Search Field

11 replies · Started by Eaydman on September 17, 2020

Viewing posts 1–12 of 12

Hi,

Is it possible someway to change the menu search field to the why on my muckup: https://share.getcloudapp.com/2NuyNQQp

Running all new Alpha of the 3.0.0 and 1.12.00

Hi there,

not sure if thats possible with the nav search - do you have a link to your site so i can take a look ?

Hi yes I have added the url in the Private information.

Will the Search icon do anything on click ?

So the search field will be opened without clicking on the icon?

It's not possible using the built-in navigation search I don't think.

You will need to add a default WordPress search field and style it accordingly.

What version of GP are you using?

R run the Beta 1.

The search filed does not need to be dynamic. Just a input field where I can search ?

You could try:

add_action( 'generate_menu_bar_items', function() {
    get_search_form();
} );

That will add the core search field into the navigation.

Then you'd just need CSS to style it accordingly.

Thanks Tom :)

No problem! :)

Hi team,

I didn't quite understand this thread. I want the same thing that @Eaydman wants but this thread is a little confusing. Seems like the @Eaydman has successfully done what you've told him.

Can you provide little steps that I can follow :(

I added the code that Tom provided

add_action( 'generate_menu_bar_items', function() {
get_search_form();
} );

but it didn't work for me. (i pasted this code in the additional CSS section of my generatepress)

Hi there,

make sure the Customizer > General > Structure is set to Flexbox, as the generate_menu_bar_items hook only exists in that version.

This archived topic is closed to new replies.