This repository has been archived by the owner on Jul 8, 2018. It is now read-only.
forked from lingz/gazelle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory.php
46 lines (42 loc) · 1.47 KB
/
category.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
<?php
/**
* The main template file.
*
* @package WordPress_Themes
* @subpackage Gridlock
*/
get_header(); ?>
<?php $cat = get_query_var("category_name");
if (!empty($cat)) { // category ?>
<div id="category-row" class="row">
<div id="category-head">
<?php $cat_name = get_category_by_slug(get_query_var("category_name"))->name; ?>
<div class="category-row header-<?php echo strtolower($cat_name); ?>"></div>
<div class="category-headline large">
<h1 class="headline-solo"><?php echo $cat_name; ?></h1>
</div>
</div>
</div>
<div class="list list-items">
<?php
if (get_query_var("category_name") == "media") {
$meta_query = new WP_Query(array_merge(array("category_name" => get_query_var("category_name"), get_option("gridlock_query")) ));
} else {
$meta_query = new WP_Query(array_merge(array("issue" => get_query_var("issue"), "category_name" => get_query_var("category_name"), get_option("gridlock_query")) ));
}
$old_row = 0;
while ( $meta_query->have_posts() ) : $meta_query->the_post(); ?>
<div class='row gridlock-row'>
<div class="article-container col-12" >
<?php get_template_part( 'content' );
// closing the column tab?>
</div>
</div>
<?php endwhile; ?>
<?php } else {
// issue
?>
<?php get_template_part("issue"); ?>
<?php } ?>
</div>
<?php get_footer(); ?>