VH Product Search Query
// WP_Query arguments $args = array( 'post_type' => array( 'products' ), 'post_status' => array( 'publish' ), 's' => 'desk', 'nopaging' => true, 'posts_per_page' => '-1', ); // The Query $product_query = new WP_Query( $args ); // The Loop if ( $product_query->have_posts() ) { while ( $product_query->have_posts() ) { $product_query->the_post(); // do something } } else { // no posts found } // Restore original Post Data wp_reset_postdata();