-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxonomy-story-draft.php
58 lines (48 loc) · 1.76 KB
/
taxonomy-story-draft.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* The template for the "Draft" story pages
*
* Archive comic stories without a taxonomy_term set.
* Using custom Taxonomy "draft" http://codex.wordpress.org/Template_Tags/get_posts#Taxonomy_Parameters
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Strip
*/
get_header(); ?>
<div id="primary"
<main id="content" class="wrap" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
</br>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description, 'strip' ); // WPCS: XSS OK.
endif; ?>
<h4 class="comic-blurb">Here are your uncategorized comics. To order them, go to Add New Comic, then + Add New Story and write a series title of your choice, or check an existing series box, if you had one. To write your own custom taxonomies, clone taxonomy-story-draft.php and replace "draft" by your own story name.</h4>
</header><!-- .page-header -->
<?php // Create and run first loop in reverse order.
$comic = new WP_Query();
$comic->query( array(
'post_type' => 'comic',
'showposts' => -1,
'story' => 'draft',
'orderby' => 'title', // You can also order by date, like regular posts.
'order' => 'DESC', // It is either ASC or DESC, standing for ascendant or descendant order.
)
);
while ( $comic->have_posts() ) : $comic->the_post();
get_template_part( 'content-comic' ); ?>
<?php endwhile; ?>
<?php
wp_reset_postdata();
?>
<?php else : ?>
<?php get_template_part( 'no-results', 'archive-comic' ); ?>
<?php endif; ?>
</main><!-- #content -->
</section><!-- #primary -->
<?php get_footer(); ?>