-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaxonomy.php
More file actions
88 lines (66 loc) · 2.53 KB
/
taxonomy.php
File metadata and controls
88 lines (66 loc) · 2.53 KB
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
<?php get_header(); ?>
<section class="section">
<div class="container">
<!-- <div class="row grid"> -->
<?php
if (!defined('POST_TYPE')) {
$current_category = get_queried_object();
$description = get_page_by_title($current_category->name);
}
?>
<?php if (!defined('POST_TYPE') && $description && has_post_thumbnail($description->ID)) { ?>
<div class="col-xs-12 grid__item category-image-wrap">
<div class="rounded-block-with-shadow animation" data-animation="fadeIn">
<?php echo get_the_post_thumbnail($description->ID, 'large', array('class' => 'img-full-width')); ?>
</div>
</div>
<?php } ?>
<!-- <div class="col-xs-12 col-sm-4 col-md-3 grid__item"> -->
<?php get_sidebar(); ?>
<!-- </div> -->
<div class="card-container">
<div class="grid-sizer"></div>
<?php if (!defined('POST_TYPE') && $description) { ?>
<div class="grid__item">
<div class=" category-description animation">
<h2 class="title">
<?php echo $description->post_title; ?>
</h2>
<!-- <div class="text-block">
</div> -->
<!-- <a class="more-link pull-right" href="<?php echo esc_url(get_permalink($description->ID)); ?>">
<?php _e('More', 'stan'); ?>
</a> -->
</div>
</div>
<?php } ?>
<?php
if (!defined('POST_TYPE')) {
global $wp_query;
$query = $wp_query;
} else {
$paged = get_query_var('paged');
$query = new WP_Query(array(
'post_type' => POST_TYPE,
// 'paged' => ($paged) ? $paged : 1
));
}
?>
<?php
// var_dump($args);
?>
<?php wp_reset_postdata(); ?>
<?php if ($query->have_posts()) : ?>
<?php while ($query->have_posts()) {
$query->the_post(); ?>
<?php post(); ?>
<?php } ?>
<?php else : ?>
<div>:(</div>
<?php endif; ?>
</div>
<?php pagination($query); ?>
<!-- </div> -->
</div>
</section>
<?php get_footer();