Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.