-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-excerpt_under.php
executable file
·123 lines (99 loc) · 4.22 KB
/
archive-excerpt_under.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
113
114
115
116
117
118
119
120
121
122
123
<?php
/**
* The archive page
*
* @package UnPress
* @since UnPress 1.0
**/
?>
<?php get_header(); ?>
<?php if (get_field ( 'category_ad', 'category_' . get_query_var('cat') )):?>
<section class="container category_advertising">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="row post-row">
<?php the_field ( 'category_ad', 'category_' . get_query_var('cat')); ?>
</div><!-- .row -->
</div><!-- .col-lg-12 -->
</section><!-- .container -->
<?php endif; ?>
<?php if (have_posts()) :?>
<section class="container module blocks2">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-4 sticky-col">
<div class="category-box sticky-box static_col">
<h2>
<?php if (is_category()) { ?>
<?php single_cat_title(); ?>
<?php } elseif(is_tag()) { ?>
<?php single_tag_title(); ?>
<?php } elseif (is_day()) { ?>
<?php printf( __( '%s', 'favethemes' ), get_the_date() ); ?>
<?php } elseif (is_month()) { ?>
<?php printf( __( '%s', 'favethemes' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'favethemes' ) ) ); ?>
<?php } elseif (is_year()) { ?>
<?php printf( __( '%s', 'favethemes' ), get_the_date( _x( 'Y', 'yearly archives date format', 'favethemes' ) ) ); ?>
<?php } elseif ( get_post_format() ) { ?>
<?php echo get_post_format(); ?>
<?php } elseif (is_author()) { ?>
<?php _e ( 'Author Archive', 'favethemes' ); ?>
<?php } ?>
</h2>
</div>
</div>
<?php
if (!get_field ( 'category_sidebar', 'category_' . get_query_var('cat') ) || get_field ( 'category_sidebar', 'category_' . get_query_var('cat') ) == "cat_sidebar_on" ):
echo '<div class="col-lg-6 col-md-6 col-sm-4">';
else:
echo '<div class="col-lg-9 col-md-9 col-sm-8">';
endif;
?>
<div class="row post-row">
<?php
while (have_posts()) : the_post();
if ( !get_field ( 'category_sidebar', 'category_' . get_query_var('cat') ) || get_field ( 'category_sidebar', 'category_' . get_query_var('cat') ) == "cat_sidebar_on"):
$css_class = "post-holder col-lg-6 col-md-12 col-sm-12 col-xs-12";
else:
$css_class = "post-holder col-lg-4 col-md-4 col-sm-6 col-xs-12 fadeIn";
endif;
?>
<div id="post-<?php the_ID(); ?>" <?php post_class($css_class); ?>>
<div class="featured-image image-holder block2_post432 holder">
<?php unpress_block_image(); ?>
</div><!-- .featured-image -->
<div class="post-content-holder">
<div class="post-content-display">
<header>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php unpress_author(); ?>
</header>
<?php if( !get_field ( 'cat_posts_excerpt', 'category_' . get_query_var('cat') ) || get_field ( 'cat_posts_excerpt', 'category_' . get_query_var('cat') ) == "enable" ): ?>
<div class="post-entry-holder hidden-md hidden-sm">
<?php the_excerpt(); ?>
</div><!-- .post-entry-holder hidden-md hidden-sm hidden-sm-->
<?php endif; ?>
</div>
</div>
</div>
<?php
endwhile;
?>
</div><!-- .row -->
</div><!-- .col-lg-9 -->
<?php
if ( !get_field ( 'category_sidebar', 'category_' . get_query_var('cat') ) || get_field ( 'category_sidebar', 'category_' . get_query_var('cat') ) == "cat_sidebar_on" ):
echo '<div class="col-md-3 col-sm-4">';
get_sidebar();
echo '</div>';
endif;
?>
</div><!-- .row -->
</section><!-- .container -->
<?php
//Page Nav
unpress_paging_nav();
else:
get_template_part( 'content', 'none' );
endif;
wp_reset_query();
?>
<?php get_footer(); ?>