forked from sbstatesman/the-statesman
/
category-opinions.php
executable file
·97 lines (97 loc) · 4.94 KB
/
category-opinions.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
<?php get_header(); ?>
<header class="row">
<div class="sectionhead">
<div class="hline hline-background"></div>
<span class="sectionhead-text sectionhead-text-centered"><?php single_cat_title(); ?></span>
</div>
</header>
<main>
<div class="hline hline-strong"></div>
<section class="row">
<sidebar class="sidebar">
<?php $args = array( 'posts_per_page' => 1, 'tag' => 'letter-to-the-editor'); ?>
<?php $myposts = new WP_Query( $args ); ?>
<?php if ( $myposts->have_posts() ) : ?>
<?php $myposts->the_post(); ?>
<h6><a href="<?php echo get_tag_link(get_tag_id('letter-to-the-editor')); ?>">Letter to the Editor</a></h6>
<article class="vmedia">
<figure class="thumbnail">
<?php if ( has_post_thumbnail()) {the_post_thumbnail('medium');} ?>
</figure>
<div class="block">
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</h2>
<p class="metatext metatext-byline small-text">By <?php the_author_posts_link(); ?> / <a href="<?php the_archive_date(); ?>"><?php the_time('F j, Y'); ?></a></p>
<p class="excerpt"><?php get_excerpt(); ?></p>
</div>
</article>
<div class="hline hline-medium"></div>
<?php endif; ?>
<h6><a href="<?php echo get_tag_link(get_tag_id('column')); ?>">Columns</a></h6>
<a href="<?php echo get_tag_link(get_tag_id('the-know')); ?>"><img src="<?php bloginfo( 'template_url' ); ?>/images/know-banner.png" alt="The Know" width="300" /></a>
<a href="<?php echo get_tag_link(get_tag_id('the-sexwolf')); ?>"><img src="<?php bloginfo( 'template_url' ); ?>/images/sexwolf-banner.png" alt="The Sexwolf" width="300" /></a>
<a href="<?php echo get_tag_link(get_tag_id('the-konig-kolumn')); ?>"><img src="<?php bloginfo( 'template_url' ); ?>/images/konig-kolumn-banner.png" alt="The Konig Kolumn" width="300" /></a>
<a href="<?php echo get_tag_link(get_tag_id('an-unpopular-opinion')); ?>"><img src="<?php bloginfo( 'template_url' ); ?>/images/unpopular-banner.png" alt="An Unpopular Opinion" width="300" /></a>
</sidebar>
<main class="main vline-medium">
<div class="main-threeeigth vline-medium">
<?php $args = array( 'posts_per_page' => 3, 'offset' => 1, 'category__and' => array($top_story, $opinions), 'tag__not_in' => array(get_tag_id('column'), get_tag_id('letter-to-the-editor'))); ?>
<?php $myposts = new WP_Query( $args ); ?>
<?php if ( $myposts->have_posts() ) : ?>
<?php while ( $myposts->have_posts() ) : ?>
<?php $myposts->the_post(); ?>
<article class="vmedia">
<figure class="thumbnail">
<?php if ( has_post_thumbnail()) {the_post_thumbnail('medium');} ?>
</figure>
<div class="block">
<h3 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</h3>
<p class="metatext metatext-byline small-text">By <?php the_author_posts_link(); ?> / <a href="<?php the_archive_date(); ?>"><?php the_time('F j, Y'); ?></a></p>
<p class="excerpt"><?php get_excerpt(); ?></p>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
<div class="main-fiveeigth">
<?php $args = array( 'posts_per_page' => 1, 'category__and' => array($top_story, $opinions), 'tag__not_in' => array(get_tag_id('column'), get_tag_id('letter-to-the-editor'))); ?>
<?php $myposts = new WP_Query( $args ); ?>
<?php if ( $myposts->have_posts() ) : ?>
<?php $myposts->the_post(); ?>
<article class="vmedia">
<figure class="thumbnail">
<?php if ( has_post_thumbnail()) {the_post_thumbnail('medium');} ?>
</figure>
<div class="block">
<h1 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</h1>
<p class="metatext metatext-byline small-text">By <?php the_author_posts_link(); ?> / <a href="<?php the_archive_date(); ?>"><?php the_time('F j, Y'); ?></a></p>
<p class="excerpt"><?php get_excerpt(); ?></p>
</div>
</article>
<div class="hline hline-medium"></div>
<?php endif; ?>
<?php $args = array( 'posts_per_page' => 5, 'cat' => $opinions, 'category__not_in' => $top_story, 'tag__not_in' => array(get_tag_id('column'), get_tag_id('letter-to-the-editor')));?>
<?php $myposts = new WP_Query( $args ); ?>
<?php if ( $myposts->have_posts() ) : ?>
<?php while ( $myposts->have_posts() ) : ?>
<?php $myposts->the_post(); ?>
<article class="hmedia-list">
<h4 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
</h4>
<p class="metatext metatext-byline small-text">By <?php the_author_posts_link(); ?> / <a href="<?php the_archive_date(); ?>"><?php the_time('F j, Y'); ?></a></p>
<p class="excerpt"><?php get_excerpt(); ?></p>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div>
</main>
</section>
<div class="hline hline-medium"></div>
</main>
<?php get_footer(); ?>