• Resolved Rimzan Hassan

    (@rimzan-hassan)


    Hi,

    I would like to know how can I move my search box below the secondary navigation. It must be on the same level as the primary navigation. I am using a child theme.

    https://www.tktrnx.com/

    Thank you in advance for the help.

    Best Regards,
    Rimzan Hassan

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Rimzan Hassan

    (@rimzan-hassan)

    Hi,

    I have made an illustration on how it should look like.

    https://i706.photobucket.com/albums/ww69/Rimzan2008/final%20capture_zps4t7mgycr.png

    Thank you in advance for the help.

    Best Regards,
    Rimzan Hassan

    Hey,

    Not sure if this will work off the top of my head but you can give it a try;

    remove_action( 'storefront_header', 'storefront_product_search', 40 );
    add_action( 'storefront_header', 'storefront_product_search',    60 );

    That’ll add the search markup after the main nav. It has the same width and layout properties as the header cart link so hopefully it will line up nicely. You might need a little custom CSS though.

    Cheers

    Thread Starter Rimzan Hassan

    (@rimzan-hassan)

    @jameskoster Thanks for the code, I had to add the below code before your code for it to work. I am adding this so it might help someone else with the same problem. Now I would like to add a Submit or Search button next to the Search Box.

    /* Begin remove the search bar from the header */
    add_action( 'init', 'jk_remove_storefront_header_search' );
    function jk_remove_storefront_header_search() {
    remove_action( 'storefront_header', 'storefront_product_search', 	40 );
    }
    /* End remove the search bar from the header */
    /* Begin move search box */
    add_action( 'storefront_header', 'storefront_product_search',    60 );
    /* End move search box */
    Thread Starter Rimzan Hassan

    (@rimzan-hassan)

    Closed

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to move the Search Box’ is closed to new replies.