Created
February 13, 2014 19:52
-
-
Save emaildano/8982538 to your computer and use it in GitHub Desktop.
Query custom post type and reset query.
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
<?php | |
$args = array( 'post_type' => 'trainers', 'posts_per_page' => -1 ); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); ?> | |
<?php the_title(); ?> | |
<?php endwhile; ?> | |
<?php wp_reset_query(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment