Skip to content

Instantly share code, notes, and snippets.

@skuter80
Created May 27, 2010 03:50
Show Gist options
  • Save skuter80/415435 to your computer and use it in GitHub Desktop.
Save skuter80/415435 to your computer and use it in GitHub Desktop.
<?php
// Create a query using the # items from the 'featured' category
$my_query = new WP_Query('category_name=featured&showposts=5');
while ($my_query->have_posts()) : $my_query->the_post();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment