Skip to content

Instantly share code, notes, and snippets.

@jpcontrerasv
Created July 30, 2014 14:53
Show Gist options
  • Save jpcontrerasv/99c795969ad0ff00a175 to your computer and use it in GitHub Desktop.
Save jpcontrerasv/99c795969ad0ff00a175 to your computer and use it in GitHub Desktop.
Query wp
<?php query_posts('cat=7&showposts=1');
if ( have_posts() ) : while ( have_posts() ) : the_post();
endwhile; else:
endif;
wp_reset_query();
?>
query_posts("cat=-1,-2,-3&page_id=7&tag=bread,baking");
<!--loop original-->
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment