Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

QueryPost1

WP_Query for custom posts

// WP_Query arguments
$args = array (
	'category_name'          => 'news_category',
	'author_name'            => 'tam_md',
	'nopaging'               => true,
);

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