I have created a custom post type in WordPress, and one of the fields is brewing company. I would like to be able to arrange the post by that field.
Something like this:
Brewing Company – Country
Beer Name, Beer Type
All of the fields are working properly, but I can’t figure out how to create the correct loop. Here is my loop section for my beers page.
>
ID, 'Query', true )); ?>
ID, 'brewing_company', true); ?> - ID, 'brewing_country', true);?>
- , ID,'beer_style', true); ?>
'
' . __( 'Pages:', 'twentyeleven' ), 'after' => '
' ) ); ?>
', '' ); ?>
The Query parameter comes from another meta value on the beers page. That is equal to post_type=beer&showposts=100&order_by=get_post_meta($post->ID, ‘brewing_company’, true).
Any help would be greatly appreciated. You can see my current progress at http://drewclardy.com/beers