CodeHQ

A WordPress query

A WordPress query that can be amended – like below for different post types/amount of posts/categories etc – codex info here

$args = array(
	'post_type' => 'post',
	'posts_per_page' => '16',
	'orderby' => 'rand'
);

$query = new WP_Query($args);

 $i = 1;

while ( $query->have_posts() ) : $query-> the_post();