Skip to content

Instantly share code, notes, and snippets.

@cameronbaney
Created June 6, 2013 15:48
Show Gist options
  • Save cameronbaney/5722576 to your computer and use it in GitHub Desktop.
Save cameronbaney/5722576 to your computer and use it in GitHub Desktop.
Basic WordPress Custom Query
<?php
$custom = new WP_Query(array('post_type'=>'block','posts_per_page'=>'4','orderby'=>'menu_order','order'=>'ASC'));
while ( $custom->have_posts() ) : $custom->the_post(); ?>
<? // THE LOOP ?>
<?php
endwhile;
wp_reset_postdata();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment