WordPress

WP_Query sample

<?php
	$args = array( 
		'post_type' => 'sponsors',
		'logo-category' => 'sponsors',
		'posts_per_page' => 3,
	);
	$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
	<h3><?php the_title(); ?></h3>
	<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<?php endwhile; endif; wp_reset_query(); ?>