-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-writings.php
213 lines (180 loc) · 7.35 KB
/
page-writings.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
<?php
/**
* The template for displaying show pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package xx
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div class="container" style = "">
<article class = "page writings" href="/programming/">
<div class = "entry-content">
<!-- Blog -->
<div class = "row">
<!--
<div class = "col-lg-2 col-md-3 col-title" href = "/writings/blog">
<div class = "writings-container">
<div class = "writings-text">Blog</div>
</div>
</div>
-->
<a class="entry-link" href = "/writings/blog">
<div class="col-lg-12" href = "/writings/blog">
<div class ="entry-header">
<span class="post-featured">Blog Posts</span>
<div class="post-line" style="width: 174px;"></div>
</div>
</div>
</a>
<?php
$args = array(
'post_type'=> 'post',
'posts_per_page' => 4,
);
$the_query = new WP_Query( $args );
$count = 0;
if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class = "col-lg-3 col-md-6 col-sm-6 col-xs-12 col-extended" href = "<?php the_permalink(); ?>">
<div class = "card">
<div class = "image-div">
<?php if(has_post_thumbnail()): ?>
<img class = "card-img-top image-extended" src = "<?php the_post_thumbnail_url() ?>" >
<?php else: ?>
<img class = "card-img-top image-extended" src="<?php echo get_template_directory_uri() . '/ksdt.png'; ?>">
<?php endif; ?>
</div>
<div class = "card-block card-block-extended">
<span class = "card-title card-title-extended"><?php the_title() ?></span>
<br>
<span class="entry-date"><?php echo get_the_date(); ?> <span>/ by <?php the_author(); ?> </span> </span>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<!-- Album Reviews -->
<div class = "row">
<?php
$args = array(
'post_type'=> 'albumreviews',
'posts_per_page' => 4,
);
$the_query = new WP_Query( $args );
$count = 0;
if($the_query->have_posts() ) : ?>
<a class="entry-link" href = "/writings/albumreviews">
<div class="col-lg-12">
<div class ="entry-header">
<span class="post-featured">Album Reviews</span>
<div class="post-line" style="width: 255px;"></div>
</div>
</div>
</a>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class = "col-lg-3 col-md-6 col-sm-6 col-xs-12 col-extended" href = "<?php the_permalink(); ?>">
<div class = "card">
<?php if(has_post_thumbnail()) : ?>
<div class = "image-div">
<img class = "image-extended" src = "<?php the_post_thumbnail_url() ?>" alt = "Card image cap">
</div>
<?php else:?>
<div class = "no-image"></div>
<?php endif;?>
<div class = "card-block card-block-extended">
<span class = "card-title card-title-extended"><?php the_title() ?></span>
<br>
<span class="entry-date"><?php echo get_the_date(); ?> <span>/ by <?php the_author(); ?> </span> </span>
<!--
<p><span class = "tag tag-default"><?php $key="rating"; echo get_post_meta($post->ID, $key, true); ?></span>
<span class = "tag tag-info"><?php $key="genre"; echo get_post_meta($post->ID, $key, true); ?></span>
</p> -->
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<!-- Concert Reviews -->
<div class = "row">
<a class="entry-link" href = "/writings/concertreviews">
<div class="col-lg-12">
<div class ="entry-header">
<span class="post-featured">Concert Reviews</span>
<div class="post-line" style="width: 283px;"></div>
</div>
</div>
</a>
<?php
$args = array(
'post_type'=> 'concertreviews',
'posts_per_page' => 4,
);
$the_query = new WP_Query( $args );
$count = 0;
if($the_query->have_posts() ) : while ( $the_query->have_posts()) : $the_query->the_post(); ?>
<div class = "col-lg-3 col-md-6 col-sm-6 col-xs-12 col-extended" href = "<?php the_permalink(); ?>">
<div class = "card">
<div class = "image-div">
<img class = "image-extended" src = "<?php the_post_thumbnail_url() ?>" alt = "Card image cap">
</div>
<div class = "card-block card-block-extended">
<span class = "card-title card-title-extended"><?php the_title() ?></span>
<br>
<span class="entry-date"><?php echo get_the_date(); ?> <span>/ by <?php the_author(); ?> </span> </span>
<!--
<p><span class = "tag tag-default"><?php $key="location"; echo get_post_meta($post->ID, $key, true); ?></span>
<span class = "tag tag-info"><?php $key="genre"; echo get_post_meta($post->ID, $key, true); ?></span>
</p> -->
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<!-- Weekly picks -->
<div class = "row">
<a class="entry-link" href = "/writings/weeklypicks">
<div class="col-lg-12">
<div class ="entry-header">
<span class="post-featured">Weekly Picks</span>
<div class="post-line" style="width: 217px;"></div>
</div>
</div>
</a>
<?php
$args = array(
'post_type'=> 'weeklypicks',
'posts_per_page' => 4,
);
$the_query = new WP_Query( $args );
$count = 0;
if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class = "col-lg-3 col-md-6 col-sm-6 col-xs-12 col-extended" href = "<?php the_permalink(); ?>">
<div class = "card">
<div class = "image-div">
<img class = "image-extended" src = "<?php the_post_thumbnail_url() ?>" alt = "Card image cap">
</div>
<div class = "card-block card-block-extended">
<span class = "card-title card-title-extended"><?php the_title() ?></span>
<br>
<span class="entry-date"><?php echo get_the_date(); ?> <span>/ by <?php the_author(); ?> </span> </span>
<!-- <p><span class="tag tag-default">Artists</span> : <?php $key="artists"; echo get_post_meta($post->ID, $key, true); ?></p> -->
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
</div>
</article>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer();