Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Post, Page, and Category

should (in theory) show the post, page, and category in the loop

// WP_Query arguments
$args = array(
	'post_type'              => array( 'page', ' post' ),
	'has_password'           => false,
	'nopaging'               => true,
	'ignore_sticky_posts'    => false,
	'tax_query'              => array(
		array(
			'taxonomy'         => 'category',
			'terms'            => 'featured',
			'field'            => 'slug',
			'operator'         => 'AND',
			'include_children' => true,
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();