-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtaxonomy-issuem_issue.php
86 lines (70 loc) · 2.13 KB
/
taxonomy-issuem_issue.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* The template for displaying archive pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package ufclas-newsletter
*/
get_header(); ?>
<?php
// Remove articles tagged as 'sidebar' from the main area
$issue_args = array(
'post_type' => 'article',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'issuem_issue',
'field' => 'slug',
'terms' => $wp_query->get('issuem_issue')
),
array(
'taxonomy' => 'post_format',
'field' => 'slug',
'terms' => 'post-format-aside',
'operator' => 'NOT IN'
),
)
);
$issue_query = new WP_Query( $issue_args );
?>
<div id="issue-toc" class="container_12" <?php echo get_ufclas_newsletter_issue_cover_style(); ?>>
<div class="toc-content grid_4">
<h2 class="entry-title hidden">In the current issue:</h2>
<?php while ( $issue_query->have_posts() ) : $issue_query->the_post(); ?>
<div class="article-link-<?php the_ID(); ?>">
<a href="<?php the_permalink(); ?>" class="issuem_article_link"><?php the_title(); ?></a>
</div>
<?php endwhile; ?>
</div><!-- toc-content -->
</div><!-- #issue-toc -->
<div class="clear"></div>
<div class="container_12">
<section id="primary" class="content-area grid_8">
<main id="main" class="site-main" role="main">
<?php
if ( $issue_query->have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php single_term_title(); ?></h1>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php while ( $issue_query->have_posts() ) : $issue_query->the_post(); ?>
<?php
get_template_part( 'content', get_post_type() );
?>
<?php endwhile; ?>
<?php ufclas_newsletter_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar('issue'); ?>
<?php get_footer(); ?>