Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

複数記事タグ

// WP_Query arguments
$args = array(
	'post_type'              => array( 'multitag' ),
	'post_status'            => array( 'public' ),
	'nopaging'               => true,
	'ignore_sticky_posts'    => true,
	'tax_query'              => array(
		'relation' => 'AND',
		array(
			'taxonomy'         => 'post_tag',
			'terms'            => 'roadbike',
			'field'            => 'slug',
		),
		array(
			'taxonomy'         => 'post_tag',
			'terms'            => 'giant',
			'field'            => 'slug',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();