-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-template.php
executable file
·93 lines (69 loc) · 3.07 KB
/
front-template.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
<?php
/**
* Template Name: Front
*
*/
?>
<?php get_header(); ?>
<?php do_action('before_villain'); ?>
<?php
$villain_data = Coprime::get_instance()->get_villain_query();
$villain_query = $villain_data['query'];
$villain_mode = $villain_data['mode'];
$villain_episodes = array();
?>
<section id="villain-container" class="<?php echo $villain_mode; ?>">
<div class="villain-wrapper">
<?php
while ($villain_query->have_posts()): $villain_query->the_post();
$villain_episodes[] = get_the_ID();
get_template_part('partials/villain');
endwhile; ?>
<?php do_action('in_villain'); ?>
</div>
</section>
<?php do_action('after_villain'); ?>
<?php do_action('before_world'); ?>
<section id="world">
<div id="content-container">
<div class="content-wrapper">
<?php do_action('before_content'); ?>
<?php if ( have_posts() ): while ( have_posts() ): the_post();
if ( strlen(get_the_content()) > 0 ):
?>
<div id="noticeboard">
<?php the_content(); ?>
</div>
<?php endif; endwhile; endif; ?>
<div id="showboard">
<div class="top">
<ul>
<?php
$topshelf_query = Coprime::get_instance()->get_showboard_primary_query($villain_episodes);
while ($topshelf_query->have_posts()): $topshelf_query->the_post();
get_template_part('partials/showboard');
endwhile;
?>
</ul>
</div>
<div class="bottom">
<ul>
<?php
$bottom_query = Coprime::get_instance()->get_showboard_fringe_query();
while ($bottom_query->have_posts()): $bottom_query->the_post();
get_template_part('partials/showboard');
endwhile;
?>
</ul>
</div>
<div class="baseline">
<h3 class="all-shows"><a href="<?php echo site_url('/shows/'); ?>">← All Shows</a></h3>
<h3 class="more-episodes"><a href="<?php echo site_url('/episode/'); ?>">More Episodes →</a></h3>
</div>
</div>
<?php do_action('after_content'); ?>
</div>
</div>
</section>
<?php do_action('after_world'); ?>
<?php get_footer(); ?>