bloqhead
11/4/2013 - 9:22 PM

orderby_meta_key.php

<?php
/**
 * Order by meta_key value
 */
global $page, $paged;
$args = array(
	'post_type' => 'beers',
	'meta_key' => 'brewery',
	'orderby'=> 'meta_value',
	'order' => 'ASC',
	'posts_per_page' => 25,
	'paged' => $paged
);
$the_query = new WP_Query( $args );
?>