Skip to content

Instantly share code, notes, and snippets.

@erezLieberman
Last active November 4, 2015 10:35
Show Gist options
  • Save erezLieberman/fc22ae073a669990cbcc to your computer and use it in GitHub Desktop.
Save erezLieberman/fc22ae073a669990cbcc to your computer and use it in GitHub Desktop.
short loop
<?php
$args = array (
'posts_per_page' => '-1',
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();?>
<?php }
}
wp_reset_postdata();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment