This topic has 18 replies, 3 voices, and was last updated 4 years, 6 months ago ago by Olga Barlow
How do I replace the search icon with a search box and button instead?
Lot of our customers complain about extra steps to hover over search icon and open the search box and then type
thx.
nick
Hello,
There is no such possibility by default. It requests additional customization in files, which is outside the scope of our support.
If you want to edit header type 15 you can customize the wp-content/themes/royal/headers/header-structure-1.php file. Make changes using child-theme https://developer.wordpress.org/themes/advanced-topics/child-themes/ to prevent losing it after theme update.
Regards
I’m using header type 18 now and want to drop in the Product search box form code into the Header custom HTML (for 6, 7, 13, 14, 18 headers) section. What is the correct block of code to display product search box here?? I found some code but the styling doesn’t align up properly or produce any search results
-----------------------------------------------------------------------------------------
<form action="<?php echo home_url( '/' ); ?>" class="hide-input searchform" method="get">
<div class="form-horizontal modal-form">
<div class="form-group has-border">
<div class="col-xs-10">
<input type="text" name="s" class="form-control" placeholder="Search..." />
<input type="hidden" name="post_type" value="product" />
</div>
</div>
<div class="form-group form-button">
<button type="submit" class="btn btn-black"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
--------------------------------------------------------------------------------------------------------------------------
Hello,
Try the next way –
go to Appearance > Widgets > create a custom widget area > add search widget – http://prntscr.com/s1o4n2 > http://prntscr.com/s1o5ki
[vc_widget_sidebar sidebar_id="test-area"]
add the next custom CSS code:
.header .et-search-result {
position: absolute;
z-index: 9;
background-color: white;
max-width: 350px;
border: 1px solid #e1e1e1;
padding: 0 15px;
}
you will get – http://prntscr.com/s1o6oj
Regards
k. great. where in code or files can I add id=”search” to the input type within the search form?
we are testing out Klevu search and working to integrate per their instructions link below, changing search.php and searchform.php
https://support.klevu.com/knowledgebase/integration-steps-for-wordpress/
Hello,
If you need to edit search files then copy royal/searchform.php and royal/woosearchform.php to child theme and make the necessary changes.
Regards
Is this the same code for the Etheme Search widget? I need to add ID to this form.
Hello,
Find etheme_search function if wp-content/plugins/royal-core/shortcodes/etheme_search.php, copy it to child theme functions.php and also add the necessary id.
Regards
K. i found that and added the id, but how do I suppress the .et-search-restul window to stop displaying? Keep showing 3 products in drop down and I don’t want it to show at all.
thx.
Hello,
There is no such option but I could provide you custom CSS to hide it. Could you provide me link to page where you use this widget?
Regards
See link. Search box top left
Hello,
Add the following code to Theme Options > Custom CSS
.header .et-search-result {
display: none;
}
Regards
K. that worked great. is there css to also hide the search icon on “Desktop”. Now that I have search box top left, don’t really need the search icon showing on desktop.
thx!
Hello,
Theme Options > Header settings > Enable search form in header > Off
or use the next custom CSS code
.navbar-right .header-search {
display: none;
}
Regards
This hides search icon on all devices. what css do i use to hide on just desktop?? I want the search icon to still show on Mobile/Tablet
Hi,
Add the mentioned code in Theme Options > Custom CSS > Custom CSS for desktop
Regards
that worked. thx!
Hello,
You are welcome.
Regards
You must be logged in to reply to this topic.Log in/Sign up