Skip to content

Instantly share code, notes, and snippets.

@paullinney
Created September 17, 2014 10:02
Show Gist options
  • Save paullinney/4c792e71bffabe2cff66 to your computer and use it in GitHub Desktop.
Save paullinney/4c792e71bffabe2cff66 to your computer and use it in GitHub Desktop.
<?php
$args = array( 'post_type' => 'MYPOSTTYPE', 'posts_per_page' => 1 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_title();
include 'single-MYPOSTTYPE.php';
endwhile;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment