Last active
September 14, 2017 12:33
-
-
Save jasonglisson/b08be11ecf971aae7622 to your computer and use it in GitHub Desktop.
Wordpress: Query Post Types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array( 'post_type' => 'product', 'posts_per_page' => 10 ); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
the_title(); | |
echo '<div class="entry-content">'; | |
the_content(); | |
echo '</div>'; | |
endwhile; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment