Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Johnny Bugs Testimonial Query

Custom query for Testimonials Custom Post Type

// WP_Query arguments
$args = array(
	'p'                      => 'testimonial',
	'post_type'              => array( 'page' ),
	'posts_per_page'         => '2',
	'order'                  => 'DESC',
	'orderby'                => 'rand',
);

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