-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patharchive.php
More file actions
76 lines (63 loc) · 1.56 KB
/
archive.php
File metadata and controls
76 lines (63 loc) · 1.56 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
<?php
/*
* The template for displaying Category/Tag pages
*/
get_header();
?>
<div class="wrapper">
<section class="single-hero-section" style="background-color: #1cafff;">
<div class="container">
<div class="row">
<div class="col-12">
<div class="section-title">
<h1>
<?php
the_archive_title();
?>
</h1>
</div>
</div>
</div>
</section>
<section class="blog-section">
<div class="container">
<div class="row row-list-blog">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
add_query_arg('paged', $paged);
//add_query_arg('post_type', 'post');
if (have_posts()) : ?>
<?php
// Start the Loop
while (have_posts()) : the_post();
if(get_post_type()!='acf-field-group') {
get_template_part('inc/blog_loop_single');
}
endwhile;
endif;
$category = get_category(get_query_var('cat'));
if(isset($category)){
if(isset($category->cat_ID)) {
$cat_id = $category->cat_ID;
}
}
if(get_post_type() == 'event') {
$cat_id = get_queried_object()->term_id;
}
?>
</div>
<div class="row loadNews_row">
<div class="col-12">
<div class="section-button">
<button class="c-btn btn-main loadNews" data-post-type="<?php echo get_post_type(); ?>" data-category="<?php
if(isset($cat_id)) {
echo $cat_id;
} ?>" id="loadNews"><?php echo __('Load More','nextcloud'); ?></button>
</div>
</div>
</div>
</div>
</section>
</div>
<?php
get_footer();