[Resolved] Adding search bar to secondary navigation.

Home Forums Support [Resolved] Adding search bar to secondary navigation.

Home Forums Support Adding search bar to secondary navigation.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1616628
    Jordan

    Trying to add the search box to my secondary nav using a snippet I found on another post but for some reason the icon hasn’t moved, but the search bar appears in the secondary location

    https://bayoubutlersauces.com/bayou-butler-sauces/

    I used the code below:

    add_action( ‘wp’, function() {
    if ( ‘enable’ === generate_get_option( ‘nav_search’ ) ) {
    remove_action( ‘generate_menu_bar_items’, ‘generate_do_navigation_search_button’ );
    add_action( ‘generate_secondary_menu_bar_items’, ‘generate_do_navigation_search_button’ );

    remove_action( ‘generate_inside_navigation’, ‘generate_navigation_search’ );
    add_action( ‘generate_inside_secondary_navigation’, ‘generate_navigation_search’ );
    }
    }, 20 );

    #1616707
    David
    Staff
    Customer Support

    Hi there,

    where did you add the Code ?

    #1617381
    Jordan

    Child theme! functions.php

    #1617716
    Leo
    Staff
    Customer Support

    Can you provide a link to your site?

    Is it activated in the customizer under the primary navigation?

    #1617723
    Jordan

    Yes. Its activated, and it works. But if you try it, you click the search icon and the bar actually appears over the secondary icons in the top right, so it’s like it’s partially working.

    https://bayoubutlersauces.com/bayou-butler-sauces/

    #1617831
    Leo
    Staff
    Customer Support

    Can you disable the CSS in your child theme to test first?

    Let me know 🙂

    #1618891
    Jordan

    Yup. Just disabled it. Very minimal css happening so far. Same result.

    #1618944
    Leo
    Staff
    Customer Support

    Can you try switching from Float to Flex in Customizer > General?

    It should work better 🙂

    #1619489
    Jordan

    Oh awesome! Yup that worked. I didn’t realize that flex feature was there. Love it!

    #1620267
    Leo
    Staff
    Customer Support

    Glad to hear 🙂

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