Created
December 3, 2013 08:59
-
-
Save samuelhorn/7766127 to your computer and use it in GitHub Desktop.
Custom post type query
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
<?php | |
// Makes an array with own query wich not affects the ain loop | |
$events = new WP_Query(array("post_type" => "event")); | |
if ($events->have_posts()): while($events->have_posts()): $events->the_post(); | |
get_template_part("loop"); | |
the_content(); | |
endwhile; endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment