forked from SayflyAM/Amir-Travel-Europe---Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
61 lines (49 loc) · 1.6 KB
/
search.php
File metadata and controls
61 lines (49 loc) · 1.6 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
<?php
/**
* The template for displaying search results pages.
*
* @package Travel Tour
*/
get_header();
$sidebar_layout = travel_tour_get_sidebar_layout();
$view = get_theme_mod( 'blog_post_view', 'list-view' );
if( $sidebar_layout == 'no-sidebar' ) {
$content_column_class = 'col-md-12';
} else {
$content_column_class = 'col-md-9';
}
?>
<div class="my-64">
<div class="container-xl">
<div class="row">
<?php if ( $sidebar_layout == 'left-sidebar' ) : ?>
<div class="col-md-3"><?php get_sidebar(); ?></div>
<?php endif; ?>
<div class="<?php echo esc_attr( $content_column_class ); ?>">
<?php if( have_posts() ) : ?>
<h1 class="mb-32">
<?php printf( esc_html__( 'Search results for: "%s"', 'default' ), '<span>' . get_search_query() . '</span>' ); ?>
</h1>
<?php endif; ?>
<div class="w-p100 grid gap-20 gap-sm-40 overflow-hidden">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
get_template_part( 'template-parts/content', null, array(
'view' => $view
) );
?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</div>
<?php travel_tour_pagination( $wp_query ); ?>
</div><!-- #primary -->
<?php if( $sidebar_layout == 'right-sidebar' ) : ?>
<div class="col-md-3"><?php get_sidebar(); ?></div>
<?php endif; ?>
</div>
</div>
</div>
<?php get_footer(); ?>