-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
59 lines (43 loc) · 1.92 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
<?php
get_header();
get_template_part( 'heading' );
$layout = monica_option_data( 'select_archive_style' );
$column = monica_option_data( 'select_archive_columns' );
$column = $layout == 'default' ? 12 : $column;
$sb = monica_option_data( 'select_post_sidebar' );
$ctwd = $sb == 'fullwidth' ? 12 : 8;
if ( $layout == 'masonry' )
wp_enqueue_script( 'masonry' );
?>
<div class="site-main bottom-60 site-layout-<?php echo esc_attr( $layout );?>">
<div class="container">
<div class="row" id="<?php echo esc_attr( $sb );?>">
<div id="archive-content" class="content col-md-12<?php ///echo esc_attr( $ctwd );?>">
<div class="row layout-<?php echo esc_attr( $layout );?>">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="column col-sm-12 ?>">
<!-- <div class="column col-sm-6 col-lg-<?php echo esc_attr( $column );?> col-md-<?php echo esc_attr( $column );?>"> -->
<?php get_template_part( 'template/content', $layout ); ?>
</div><!-- // .column -->
<?php endwhile; else: ?>
<div class="col-lg-12 col-md-12">
<p><?php esc_html_e( 'No post found. Please try again by another keyword.','monica_theme' );?></p>
</div>
<?php endif; ?>
</div><!-- // .row -->
<?php
echo paginate_links(
array(
'type' => 'list',
)
);
?>
</div><!-- // #archive-content -->
<?php
if ( $ctwd == 8)
get_sidebar();
?>
</div><!-- // .row -->
</div><!-- // .container -->
</div><!-- // .site-main -->
<?php get_footer(); ?>