Plugin Support
Marta
(@martadella)
Hi @natgo,
This is because your theme hides the menu whenever a menu item is clicked. To override this behavior, you can try to change some FiboSearch settings. Go to WooCommerce -> FiboSearch -> Search bar (tab) and check the “The search will open in overlay on mobile” option in the “Layout” section. If you can’t see the section, click “Show advanced settings” at the top of the page.
Let us know if this fixes the problem!
Regards,
Marta
Thread Starter
natgo
(@natgo)
Hi there! Thank you so much.
Yes of course with that configuration and ok but I wanted directly to be able to write the search in the menu without opening a new screen. On the other hand, is it not feasible to use the theme’s native search engine?
Plugin Support
Marta
(@martadella)
Hi,
In this case, if you don’t want to open a new screen, you’d need to use some JavaScript:
<script>
document.querySelector("#menu-item-14010").addEventListener("click", function(event) {
event.stopPropagation();
}, true);
</script>
There are at least 3 ways to add this code to your website:
1. If you have a child theme, you can paste this code into footer.php file, right before the closing </body> tag.
2. You can use a plugin that would allow inserting JavaScript, eg. Insert Headers and Footers by WPBeginner. Paste the code into the “Scripts in Footer” section.
3. If you’re already using the Code Snippets plugin, you can modify the code to use it as a PHP snippet:
add_action('wp_footer', function() {
echo '<script>
document.querySelector("#menu-item-14010").addEventListener("click", function(event) {
event.stopPropagation();
}, true);
</script>';
});
This code will work only for menu item with ID 14010. If you need to use it on a different website, you’ll need to check the menu item ID and update the code.
Let us know if this works for you!
Regards,
Marta
Thread Starter
natgo
(@natgo)
Thanks a lot!!!!! it has worked very well! I thank you.
Very good complement!