This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/search.php

71 lines
1.6 KiB
PHP
Raw Normal View History

2014-12-10 11:36:38 +00:00
<?php
/**
2017-04-15 14:58:39 +00:00
* The template for displaying search results pages.
2014-12-10 11:36:38 +00:00
*
* @package understrap
*/
2017-04-15 14:58:39 +00:00
get_header();
$container = get_theme_mod( 'understrap_container_type' );
2017-11-27 04:10:48 +00:00
?>
2017-04-15 14:58:39 +00:00
<div class="wrapper" id="search-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
2017-04-15 14:58:39 +00:00
<div class="row">
<!-- Do the left sidebar check and opens the primary div -->
2017-10-27 02:45:44 +00:00
<?php get_template_part( 'global-templates/left-sidebar-check' ); ?>
2017-04-15 14:58:39 +00:00
<main class="site-main" id="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf(
/* translators:*/
esc_html__( 'Search Results for: %s', 'understrap' ),
2017-04-15 14:58:39 +00:00
'<span>' . get_search_query() . '</span>' ); ?></h1>
</header><!-- .page-header -->
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php
/**
* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called content-search.php and that will be used instead.
*/
get_template_part( 'loop-templates/content', 'search' );
?>
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php endwhile; ?>
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php else : ?>
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php endif; ?>
2017-04-15 14:58:39 +00:00
</main><!-- #main -->
2017-04-15 14:58:39 +00:00
<!-- The pagination component -->
<?php understrap_pagination(); ?>
2016-11-23 09:42:53 +00:00
2017-04-15 14:58:39 +00:00
<!-- Do the right sidebar check -->
2017-11-27 04:10:48 +00:00
<?php get_template_part( 'global-templates/right-sidebar-check' ); ?>
2017-04-15 14:58:39 +00:00
</div><!-- .row -->
2017-04-15 14:58:39 +00:00
</div><!-- Container end -->
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
</div><!-- Wrapper end -->
2014-12-10 11:36:38 +00:00
2017-04-15 14:58:39 +00:00
<?php get_footer(); ?>