Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Can you please share your site link so that I can check it?

    Thread Starter alessiobrii

    (@alessiobrii)

    Hello the search box works as from one of default options. The point is that I would like to show the search field on the header always open without the need for the user to click on the icon.
    See here: briizy.com

    Follow the below steps to do it –

    1. Create a template using the search widget in the Dashboard > Theme Panel > My Library and copy the template shortcode
    2. Go to Customize > Header > General section and add the copied shortcode in the ‘After header content’ field
    3. Disable the default search icon from the Customize > Header > General > Menu section

    Thread Starter alessiobrii

    (@alessiobrii)

    Thank you!!!
    DO you if the foollowing are possible?
    1) how to display the search under the main mennu vs on the right side
    2) How do show it also on mobile not under the menu icon but on the header ?

    Tnx a lot!

    A. I don’t think it is possible.

    B. Use the below method to do it –

    1. Create a custom template using Elementor under Theme Panel > My Library. Use only Search Icon widget in this template and copy the template shortcode
    2. Now add the below code to the functions.php file of the child theme to display it. Replace the template shortcode with your copied template shortcode in the code –

    function prefix_mobile_menu_search_icon() {
        echo do_shortcode( '[oceanwp_library id="307"]' );
    }
    add_action('ocean_before_mobile_icon_inner','prefix_mobile_menu_search_icon');

    3. Try using the below CSS code. After adding the code, test it on a live page. Change the Elementor id (18262) with your section id. You can check it on inspecting the page –

    @media only screen and (max-width: 959px) {
    body.default-breakpoint .oceanwp-mobile-menu-icon {
        display: flex;
    }
    }
    .elementor.elementor-18262 {
        margin-top: -8px;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search Box open by default on header’ is closed to new replies.