New answers tagged

0

The code you have presented is just the output of the search. You will want to modify the search form itself. Without being sure of your comfort level, I would recommend the article "How to Limit Your Wordpress Search Results" to walk you through that modification.


0

This code will only search form woocommerce products. If you want to show any other search result from another post type you can do by simply change post type slug 'product' with you own post type slug add_action( 'pre_get_posts', 'wpse223576_search_woocommerce_only' ); function wpse223576_search_woocommerce_only( $query ) { if( ! is_admin() && ...


Top 50 recent answers are included