forked from e-Government-Cambodia/cam-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
63 lines (54 loc) · 1.23 KB
/
archive.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
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Cambodia_Portal
*/
get_header();
the_cam_portal_breadcrumbs();
$queried_object = get_queried_object();
$display_blog = '';
$display_blog = get_term_meta( $queried_object->term_id, 'cam_portal_category_blog', true );
?>
<div class="container">
<div class="row">
<div class="col-lg-8">
<?php
switch ( $display_blog ) {
case 'document' :
get_template_part( 'template-parts/content', 'archive-doc-filter' );
break;
default:
}
?>
<div class="b-2">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
switch ( $display_blog ) {
case 'document' :
get_template_part( 'template-parts/content', 'document' );
break;
default:
get_template_part( 'template-parts/content', 'archive' );
}
endwhile;
cam_portal_paginations();
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
<!--End b-2 -->
</div>
<!--End col-lg-8 -->
<?php get_sidebar(); ?>
</div>
<!-- End row -->
</div>
<!-- End container -->
<?php
get_footer();