Skip to content

Instantly share code, notes, and snippets.

@DrewAPicture
Created March 27, 2012 21:38
Show Gist options
  • Save DrewAPicture/2220575 to your computer and use it in GitHub Desktop.
Save DrewAPicture/2220575 to your computer and use it in GitHub Desktop.
<?php
$args = array(
'posts_per_page' => 5,
'order' => 'ASC',
'orderby' => 'title',
'meta_query' => array(
array(
'key' => '',
'value' => '',
'orderby' => 'value'
)
)
);
$myloop = new WP_Query( $args );
if ( $myloop->have_posts() ) : while ( $myloop->have_posts() ) : $myloop->the_post(); $count++;
enwhile; endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment