Created
October 22, 2012 07:44
-
-
Save cphilippsen/3930169 to your computer and use it in GitHub Desktop.
WP_Query loop with Custom Post Type
This file contains 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
$movies = new WP_Query( | |
array( | |
'post_type' => 'movie_reviews', | |
'order' => 'DESC', | |
'orderby' => 'date' | |
) | |
); | |
<?php while ( $movies->have_posts() ) : $movies->the_post(); ?> | |
<?php the_title(); ?> | |
<?php the_content(); ?> | |
... etc ... | |
<?php endwhile; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment