forked from zrj766/RiPro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
42 lines (41 loc) · 1.43 KB
/
search.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
<?php
get_header();
$sidebar = cao_sidebar();
$column_classes = cao_column_classes( $sidebar );
?>
<div class="container">
<?php if ( have_posts() ) : ?>
<?php get_template_part( 'parts/filter-bar' ); ?>
<?php endif; ?>
<div class="row">
<div class="<?php echo esc_attr( $column_classes[0] ); ?>">
<div class="content-area">
<main class="site-main">
<?php if ( have_posts() ) : ?>
<?php if ( is_home() ) : ?>
<!-- <h1 class="latest-title">最新文章</h1> -->
<h3 class="section-title"><span><i class="fa fa-list-alt"></i> 最新文章</span></h3>
<?php endif; ?>
<div class="row posts-wrapper">
<?php while ( have_posts() ) : the_post();
get_template_part( 'parts/template-parts/content', _cao( 'latest_layout', 'list' ) );
endwhile; ?>
</div>
<?php get_template_part( 'parts/pagination' ); ?>
<?php else : ?>
<?php get_template_part( 'parts/template-parts/content', 'none' ); ?>
<?php endif; ?>
</main>
</div>
</div>
<?php if ( $sidebar != 'none' ) : ?>
<div class="<?php echo esc_attr( $column_classes[1] ); ?>">
<?php get_sidebar(); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php
wp_reset_postdata();
echo ob_get_clean();
get_footer();