Site logo

[Resolved] Change Search Field

Home Forums Support [Resolved] Change Search Field

Home Forums Support Change Search Field

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1447033
    Eaydman

    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

    #1447090
    David
    Staff
    Customer Support

    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 ?

    #1448297
    Eaydman

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

    #1448591
    David
    Staff
    Customer Support

    Will the Search icon do anything on click ?

    #1450331
    Eaydman

    Thats not so important, just be somehow like the muckup (https://share.getcloudapp.com/2NuyNQQp)

    #1451156
    Leo
    Staff
    Customer Support

    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?

    #1451179
    Eaydman

    R run the Beta 1.

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

    #1451235
    Tom
    Lead Developer
    Lead Developer

    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.

    #1455211
    Eaydman

    Thanks Tom 🙂

    #1455729
    Tom
    Lead Developer
    Lead Developer

    No problem! 🙂

    #1652744
    Den

    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)

    #1652965
    David
    Staff
    Customer Support

    Hi there,

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

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.