Skip to content

Instantly share code, notes, and snippets.

Created December 25, 2011 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/1519651 to your computer and use it in GitHub Desktop.
Save anonymous/1519651 to your computer and use it in GitHub Desktop.
Category Featured Query
<?php
$args = array(
'cat' => get_query_var( 'cat' ),
'posts_per_page' => '-1',
'meta_query' => array(
array(
'key' => 'be_category_featured',
'value' => 'on'
)
);
);
$featured = new WP_Query( $args );
if( $featured->have_posts() ): while( $featured->have_posts() ): $featured->the_post();
post information goes here
endwhile; endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment