Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Posts Loop

Featured Posts

// WP_Query arguments
$args = array(
	'post_type'              => array( 'post' ),
	'tax_query'              => array(
		'relation' => 'AND',
		array(
			'taxonomy'         => 'category',
			'terms'            => 'training',
			'field'            => 'term_id',
		),
		array(
			'taxonomy'         => 'tag',
			'terms'            => 'featured',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();