-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory.php
executable file
·112 lines (79 loc) · 2.48 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
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
<?php
/**
* *PHP version 8.0
*
* Category page | core/category.php.
*
* @category Category_Page
* @package Clashvibes
* @subpackage Category_Page
* @author Raymond Thompson <ray_thomp@hushmail.com>
* @copyright 2017 Raymond Thompson
* @license http://www.gnu.org/licenses/gpl-3.0.en.html GPLv3
* @version GIT: https://github.com/raythompsonwebdev/clashvibes.git
* @link http:www.raythompsonwebdev.co.uk custom template
*/
get_header();
?>
<?php
if (is_category('audio-clashes') ) :
get_sidebar('audio');
elseif (is_category('video-clashes') ) :
get_sidebar('video');
elseif (is_category('clash-events') ) :
get_sidebar('events');
else :
get_sidebar();
endif;
?>
<main id="primary" class="site-main">
<?php
/**
* Check if there are any posts to display.
*/
if (have_posts() ) :
?>
<h2 class="archive-title"><?php single_cat_title('Category : ', 'clashvibes'); ?></h2>
<?php
while ( have_posts() ) :
the_post();
?>
<article <?php post_class('blog-card'); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php
the_title('<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h2>');
if ('post' === get_post_type() ) :
?>
<div class="entry-meta">
<?php
clashvibes_posted_on();
?>
</div>
<?php
endif;
?>
</header>
<!--featured Image-->
<a href="<?php echo esc_url(get_permalink()); ?>" title="Permanent Link to <?php the_title_attribute(); ?>;">
<?php if (has_post_thumbnail() ) : ?>
<?php clashvibes_post_thumbnail(); ?>
<?php else : ?>
<?php endif; ?>
</a>
<div class="entry-content">
<?php
the_excerpt();
?>
</div>
<?php if (get_edit_post_link() ) : ?>
<footer class="entry-footer">
<?php clashvibes_entry_footer(); ?>
</footer>
<?php endif; ?>
</article>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part('template-part/content', 'none'); ?>
<?php endif; ?>
</main>
<?php get_footer(); ?>