Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

featured products

firstlight

// WP_Query arguments
$args = array(
	'post_type'              => array( 'product' ),
	'post_status'            => array( 'published' ),
	'nopaging'               => true,
	'posts_per_page'         => '10',
	'ignore_sticky_posts'    => false,
	'orderby'                => 'rand',
	'tax_query'              => array(
		'relation' => 'AND',
		array(
			'taxonomy'         => 'tag',
			'terms'            => 'featured',
			'field'            => 'slug',
			'operator'         => 'IN',
		),
	),
);

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