forked from mapsteps/page-builder-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
81 lines (50 loc) · 1.83 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
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
<?php
/**
* Search Template
*
* @package Page Builder Framework
*/
// exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
$grid_gap = get_theme_mod( 'sidebar_gap', 'medium' );
get_header(); ?>
<div id="content">
<?php do_action( 'wpbf_content_open' ); ?>
<?php wpbf_inner_content(); ?>
<?php do_action( 'wpbf_inner_content_open' ); ?>
<div class="wpbf-grid wpbf-main-grid wpbf-grid-<?php echo esc_attr( $grid_gap ); ?>">
<?php do_action( 'wpbf_sidebar_left' ); ?>
<main id="main" class="wpbf-main wpbf-medium-2-3<?php echo wpbf_archive_class(); // WPCS: XSS ok. ?>">
<?php do_action( 'wpbf_main_content_open' ); ?>
<?php if( have_posts() ) : ?>
<h1 class="page-title">
<?php
printf( // WPCS: XSS ok.
/* translators: 1: Search query name */
__( 'Search Results for: %s', 'page-builder-framework' ),
'<span>' . get_search_query() . '</span>'
);
?>
</h1>
<?php do_action( 'wpbf_before_loop' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'inc/template-parts/article' ); ?>
<?php endwhile; ?>
<?php do_action( 'wpbf_after_loop' ); ?>
<?php else : ?>
<?php get_template_part( 'inc/template-parts/article-none' ); ?>
<?php endif; ?>
<?php the_posts_pagination( array(
'mid_size' => 2,
'prev_text' => __( '← Previous', 'page-builder-framework' ),
'next_text' => __( 'Next →', 'page-builder-framework' ),
) ); ?>
<?php do_action( 'wpbf_main_content_close' ); ?>
</main>
<?php do_action( 'wpbf_sidebar_right' ); ?>
</div>
<?php do_action( 'wpbf_inner_content_close' ); ?>
<?php wpbf_inner_content_close(); ?>
<?php do_action( 'wpbf_content_close' ); ?>
</div>
<?php get_footer(); ?>