Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Products Query

Featured products query

// WP_Query arguments
$args = array(
	'post_type'              => array( 'product' ),
	'post_status'            => array( 'publish' ),
	'author'                 => '75',
	'posts_per_page'         => '12',
	'ignore_sticky_posts'    => true,
	'order'                  => 'ASC',
	'orderby'                => 'comment_count',
	'meta_query'             => array(
		'relation' => 'AND',
		array(
			'key'     => 'featured',
			'value'   => '1',
			'compare' => '=',
		),
	),
);

// The Query
$products = new WP_Query( $args );

// The Loop
if ( $products->have_posts() ) {
	while ( $products->have_posts() ) {
		$products->the_post();
		// do something
	}
} else {
	// no posts found
}

// Restore original Post Data
wp_reset_postdata();