Put search on header

I would like to put the search box to the header or on the top of the content area. Is it possible? Thanks in advance.

Yes, it is possible to add search in the header.

You can use this code and you will get the exact same search form like you can see in sidebar or other widgets when enabled.

<?php get_search_form(); ?>

Add this code somewhere at the end of header.php file. It will take up the full width of container but it is easy to reduce its size if needed.

You can reduce it in side by adding code like this to Theme Options - Other - Custom CSS

.form-search {
    width: 290px;
}

Not sure whether to make a new thread for this or not, but I have a question regarding this matter. Is it possible to give the search form in header.php as mentioned above have a different class name as the standard one in the sidebar? That way I can hide the one in the sidebar on mobile devices, whilst showing the one at the top of the website.

Thanks,
Thom

Hi Thom,

This is old thread and to help us keep support thread separates could you please create your own thread for your question here https://colorlibsupport.com/c/sparkling/ instead of replying on others thread as it makes the thread messy and hard to read.

If you want to you can also add reference of this thread in your newly created thread.

We would be more than happy to help you on your new thread.

Best Regards,
Movin