Hello @maheshpunhani,
Unfortunately, this feature is not available on OceanWP theme. The search function in the theme will include all content on the whole website, but for customized searching, you can search in WordPress repository to find a plugin to do this: https://wordpress.org/plugins/.
Regarding the search icon on the mobile, please add this Custom CSS and JS in its respective area and Custom JS in the field below it, and let me know how it works:
Custom CSS:
/* DropDown and Overlay */
#icon-searchform-dropdown.enable-manually,
#icon-searchform-overlay.enable-manually {
display: block;
visibility: visible;
opacity: 1;
-moz-opacity: 1;
-webkit-opacity: 1;
}
Custom JS:
jQuery(document).ready(function($) {
/* DropDown */
$( ".oceanwp-mobile-menu-icon .search-icon-dropdown" ).click(function() {
$( this ).parents().eq(2).find(".search-style-dropdown").toggleClass( "enable-manually" );
});
/* Overlay */
$( ".oceanwp-mobile-menu-icon .search-icon-overlay" ).click(function() {
$( this ).parents().eq(2).find(".search-style-overlay").toggleClass( "enable-manually" );
});
$(".search-style-overlay .search-overlay-close").click(function() {
$( this ).parents().eq(3).find(".search-style-overlay").removeClass( "enable-manually" );
});
});
Note: For more information about the CSS and JS code on the customizer, please read this link:
https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website
Best Regards
-
This reply was modified 1 year, 9 months ago by Shahin.
Thread Starter
Mahesh
(@maheshpunhani)
Hi Shahin,
Thanks for the response.
I think I am not able to explain my issue. I am using [oceanwp_search] shortcode to display a search form but it is not respecting the search settings in the customizer. It works fine with the header search but not with the shortcode that oceanwp provides.
Or are you saying that the shortcode has been built in a way that it will not work like that and I will have to find a plugin for the same?
Thanks
Mahesh
Hello @maheshpunhani,
Yes, unfortunately this shortcode “[oceanwp_search]” will not work with the customizer; and you can search in WordPress repository to find a plugin to do this: https://wordpress.org/plugins/.
Best Regards
Thread Starter
Mahesh
(@maheshpunhani)
Thanks for the confirmation. I found the plugin and it is working fine. I am using Premmerce Product Search for WooCommerce
You’re welcome.
I’m glad it is solved.