-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcurrent-issue.php
121 lines (95 loc) · 3.27 KB
/
current-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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
/**
* Template Name: Current Issue
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Anvil_Framework
*/
$editor = get_anvil_articles_by_cat( 'from-the-editor', 1 );
$features = get_anvil_articles_by_cat( 'features', 99 );
$more_in_issue = get_anvil_articles_more_in_issue( 99 );
$web_only = get_anvil_articles_by_cat( 'web-exclusives', 99 );
$news = '';
$lp_title = anvil_get_option( 'lp_title' );
$blog_page_id = get_option( 'page_for_posts' );
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<div class="articles-panels">
<?php if ( $editor ) : ?>
<section class="articles-panel articles-featured">
<div class="shell-full">
<h2 class="panel-title">From the Editor</h2>
<?php
foreach ( $editor as $item ) {
include ( locate_template( 'template-parts/article-featured.php' ) );
}
?>
</div><!-- .shell-full -->
</section><!-- .articles-featured -->
<?php endif; ?>
<?php if ( $features ) : ?>
<section class="articles-panel articles-side-ad">
<div class="shell-full">
<h2 class="panel-title">Features</h2>
<div class="articles-container">
<div class="articles-wrapper">
<?php
foreach ( $features as $item ) {
include ( locate_template( 'template-parts/article-default.php' ) );
}
?>
</div>
<?php get_sidebar('features'); ?>
</div><!-- .articles-container -->
</div><!-- .shell-full -->
</section><!-- .articles-side-ad -->
<?php endif; ?>
<?php if ( $more_in_issue ) : ?>
<section class="articles-panel articles-inline-ad">
<div class="shell-full">
<h2 class="panel-title">More In This Issue</h2>
<div class="articles-container">
<div class="articles-wrapper section-grid-4">
<?php
foreach ( $more_in_issue as $item ) {
include ( locate_template( 'template-parts/article-default.php' ) );
}
?>
<?php get_sidebar('in-this-issue'); ?>
</div><!-- .articles-wrapper -->
</div><!-- .articles-container -->
</div><!-- .shell-full -->
</section><!-- .articles-education -->
<?php endif; ?>
<?php if ( $web_only ) : ?>
<section class="articles-panel articles-no-ad">
<div class="shell-full">
<h2 class="panel-title">Web Exclusives</h2>
<div class="articles-container">
<div class="articles-wrapper section-grid-4">
<?php
foreach ( $web_only as $item ) {
include ( locate_template( 'template-parts/article-default.php' ) );
}
?>
</div>
</div><!-- .articles-container -->
</div><!-- .shell-full -->
</section><!-- .articles-education -->
<?php endif; ?>
</div><!-- .articles-panels -->
<?php if ( !empty($lp_title) ) : ?>
<div class="panel-launchpads bg-primary">
<div class="shell-full">
<h2 class="panel-title"><?php echo esc_attr($lp_title); ?></h2>
<?php get_template_part( 'template-parts/panel', 'launchpads' ); ?>
</div><!-- .shell-full -->
</div><!-- .panel-launchpads -->
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();