After doing some digging on my WordPress site, I’m pretty confident that adding the string ‘&post_type=product’ to the end of a search URL changes an Elementor search to a WooCommerce search. I’m unsure, however, how to implement this change?
What I want to do is add some code to functions.php which checks if there is some ‘?s=’ substring in a URL and if there is one, it adds ‘&post_type=product’ at the end of the URL.
Could someone show me how this is done?
2
Answers
Firstly Update your permalink and
add
Hope this will help you