WooCommerce WordPress PHP
Change Elementor Search Bar To Products Only
299 days agoChanges Elementor search bar to products only. This will then show as product archive page as well.
<?php
add_action('elementor_pro/search_form/after_input', 'woo_search_only_products', 10, 1);
function woo_search_only_products($form)
{
echo '<input type="hidden" name="post_type" value="product" />';
}
