Skip to content

Instantly share code, notes, and snippets.

@samsargent
Created May 1, 2013 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsargent/5492927 to your computer and use it in GitHub Desktop.
Save samsargent/5492927 to your computer and use it in GitHub Desktop.
Wordpress: Draft Coming Soon Teasers on archive pages
<?php
if ( is_tax('platform')) {
$args = array(
'post_type' => 'post',
'post_status' => 'draft',
'tax_query' => array(
array(
'taxonomy' => 'platform',
'field' => 'slug',
'terms' => $term->slug
)
)
);
$query = new WP_Query( $args );
if (have_posts()) : ?>
<h2> Coming Soon in the <span><?php echo $term->name; ?></span> Module:</h2>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('blogloop', 'draftteaser');
endwhile;endif;
wp_reset_postdata();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment