How can I add search bar button in header part of the theme?
I tried to add code for search bar in header.php but it didn’t work out.
Any help is appreciated.
This topic has 10 replies, 3 voices, and was last updated 9 years, 11 months ago ago by Jack Richardson
How can I add search bar button in header part of the theme?
I tried to add code for search bar in header.php but it didn’t work out.
Any help is appreciated.
Hello,
Search form can be enabled in Theme Options > Header > Enable search form in header > On.
Regards,
Eva Kemp.
I am using header variant-4 and as per your suggestion search bar will be enable in top bar..but we need in header part and don’t want to use in top bar.
Hello,
Please try to use other type of header where search form is enabled by default.
Best regards,
Jack Richardson.
Dear jack,
But I need the search button next to the menu navigation in header part only.
I don’t want in top bar.
We have already tried with custom coding in header.php but it didn’t work out.
Any help will be appreciated.
Hello,
Please provide us with wp-admin panel credentials in private content.
Regards,
Eva Kemp.
i need search box near Blog menu in menu bar. and I am using header variant-4
check this website http://www.mysticapparels.com.au/
Hello,
I’ve added the following code in header.php:
<?php etheme_get_option('search_form') ?>
<div class="custom-search">
<span data-toggle="modal" data-target="#searchModal" class="search-link">search</span>
</div>
and the css code in custom.css:
.custom-search {
position: absolute;
left: 94%;
top: 22px;
}
Please check your site. Is that what you want?
Best regards,
Jack Richardson.
Dear Jack,
Thank you for your help,
Search bar is not visible in mobile view and visible in desktop but not working.
you already have my admin panels id and password.
and another problem is that Lookbook page mobile view is not responsive. any help will be appriates.
Hello,
I’ve replaced your code in header.php with the following code:
<div class="desktop-search"><?php echo etheme_search(array()); ?></div>
and added css code to make desktop search form as yours. Please check it.
As for mobile version you can see that in our demo https://www.8theme.com/demo/legenda/ the search button is displaying in top bar when it’s enabled. In this case you can disable top bar for desktop view and enable it for mobile view by using the css code in custom.css:
.top-bar {
display: none;
}
@media (max-width: 768px){
.top-bar {
display: block !important;
}}
Note that you need to enable top bar in Theme Options > Header.
Please provide us with the screenshot with the Look Book page mobile view problem.
Best regards,
Jack Richardson.
You must be logged in to reply to this topic.Log in/Sign up