Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

post by category video

// WP_Query arguments
$args = array(
	'post_type'              => array( 'Posts' ),
	'nopaging'               => true,
	'posts_per_page'         => '3',
	'order'                  => 'ASC',
	'tax_query'              => array(
		array(
			'taxonomy'         => 'category',
			'terms'            => 'video',
			'field'            => 'slug',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();