-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.php
46 lines (44 loc) · 1.33 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
<?php get_header(); ?>
<main id="category">
<div class="wrapper">
<?php if (have_posts()) : ?>
<div class="page-title">
<h1>
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
</h1>
<?php echo category_description(); ?>
</div>
<section class="content-grid">
<?php while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="category-item">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('blog-thumbnails'); ?>
</a>
<h3 class="post-title-home">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h3>
</article>
<?php endwhile; ?>
</section>
<nav class="pagination">
<?php echo paginate_links(array(
'base' => str_replace(9999999999, '%#%', esc_url(get_pagenum_link(9999999999))),
'current' => max(1, get_query_var('paged')),
'total' => $wp_query->max_num_pages,
'end_size' => 0,
'mid_size' => 3,
'prev_next' => True,
'prev_text' => __('«'),
'next_text' => __('»'),
)); ?>
</nav>
<?php else : ?>
<?php endif; ?>
</div>
</main>
<?php get_footer(); ?>