-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
242 lines (173 loc) · 6.53 KB
/
index.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<?php
/**
* The main template
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* e.g., it puts together the home page when no home.php file exists.
*
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
*
* @package WordPress
* @subpackage Hi-Line
* @since Hi-Line 1.0
*/
get_header(); ?>
<section id="primary">
<main id="main" class="home container clearfix" role="main">
<div class="abc-column clearfix">
<div class="a-column feature column">
<div class="column-content">
<a href="<?php echo get_category_link( get_cat_ID('feature') ); ?>" class="column-title">Feature »</a>
<?php
// The Query
$the_query = new WP_Query( array( 'category_name' => 'feature', 'posts_per_page' => '5' ) );
$first = true;
// The Loop
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post(); ?>
<article <?php post_class('clearfix'); ?>>
<?php if ( $first ) : ?>
<div class="article-thumbnail">
<?php the_post_thumbnail(); ?>
</div><!-- .article-thumbnail -->
<?php $first = false; ?>
<?php else : ?>
<div class="article-thumbnail--small">
<?php the_post_thumbnail(); ?>
</div><!-- .article-thumbnail--small -->
<?php endif; ?>
<h5 class="article-author byline">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php echo get_the_author(); ?>
</h5>
<h3 class="article-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<div class="article-excerpt">
<?php the_excerpt(); ?>
</div>
</article><!-- .article -->
<?php endwhile;
endif;
/* Restore original Post Data */
wp_reset_postdata(); ?>
</div><!-- .column-content -->
</div><!-- .a-column -->
<div class="b-column news column">
<div class="column-content">
<a href="<?php echo get_category_link( get_cat_ID('news') ); ?>" class="column-title">News »</a>
<?php
// The Query
$the_query = new WP_Query( array( 'category_name' => 'news', 'posts_per_page' => '5' ) );
// The Loop
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post(); ?>
<article <?php post_class('clearfix'); ?>>
<h5 class="article-author byline">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php echo get_the_author(); ?>
</h5>
<h3 class="article-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<div class="article-excerpt">
<?php the_excerpt(); ?>
</div>
</article><!-- .article -->
<?php endwhile;
endif;
/* Restore original Post Data */
wp_reset_postdata(); ?>
</div><!-- .column-content -->
</div><!-- .b-column -->
<div class="c-column opinion column">
<a href="<?php echo get_category_link( get_cat_ID('opinion') ); ?>" class="column-title">Opinion »</a>
<div class="column-content">
<?php
// The Query
$the_query = new WP_Query( array( 'category_name' => 'opinion', 'posts_per_page' => '5' ) );
// The Loop
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post(); ?>
<article <?php post_class('clearfix'); ?>>
<h5 class="article-author byline">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php echo get_the_author(); ?>
</h5>
<h3 class="article-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<div class="article-excerpt">
<?php the_excerpt(); ?>
</div><!-- .article-excerpt -->
</article><!-- .article -->
<?php endwhile;
endif;
/* Restore original Post Data */
wp_reset_postdata(); ?>
</div><!-- .column-content -->
</div><!-- .c-column -->
</div><!-- .abc-column -->
<div class="sports column">
<?php
if (function_exists('ditty_news_ticker')) {
ditty_news_ticker(11126); ?>
<a href="<?php echo get_category_link( get_cat_ID('sports') ); ?>" class="column-title">Sports »</a>
<?php } ?>
<div class="column-content">
<?php
// The Query
$the_query = new WP_Query( array( 'category_name' => 'sports', 'posts_per_page' => '4' ) );
// The Loop
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post(); ?>
<article <?php post_class('clearfix'); ?>>
<h5 class="article-author byline">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php echo get_the_author(); ?>
</h5>
<h3 class="article-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<div class="article-excerpt">
<?php the_excerpt(); ?>
</div><!-- .article-excerpt -->
</article><!-- .article -->
<?php endwhile;
endif;
/* Restore original Post Data */
wp_reset_postdata(); ?>
</div><!-- .column-content -->
</div><!-- .column -->
<div class="entertainment column">
<a href="<?php echo get_category_link( get_cat_ID('entertainment') ); ?>" class="column-title">Entertainment »</a>
<div class="column-content">
<?php
// The Query
$the_query = new WP_Query( array( 'category_name' => 'entertainment', 'posts_per_page' => '4' ) );
// The Loop
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post(); ?>
<article <?php post_class('clearfix'); ?>>
<h5 class="article-author byline">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php echo get_the_author(); ?>
</h5>
<h3 class="article-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h3>
<div class="article-excerpt">
<?php the_excerpt(); ?>
</div><!-- .article-excerpt -->
</article><!-- .article -->
<?php endwhile;
endif;
/* Restore original Post Data */
wp_reset_postdata(); ?>
</div><!-- .column-content -->
</div><!-- .column -->
</main><!-- #main -->
</section><!-- #primary -->
<?php get_footer(); ?>