diff options
| author | Max | 2018-10-15 23:46:42 +0200 |
|---|---|---|
| committer | Max | 2018-10-15 23:46:42 +0200 |
| commit | 00c9709fd9763542e848f6278db8ba26af5c9886 (patch) | |
| tree | 92cb1c1ee4c467118e1e5a4c7e233d3feac6efa8 /search.php | |
| download | fuselkoenig_de-00c9709fd9763542e848f6278db8ba26af5c9886.tar.gz | |
Initial commit.
Diffstat (limited to 'search.php')
| -rw-r--r-- | search.php | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/search.php b/search.php new file mode 100644 index 0000000..2c59501 --- /dev/null +++ b/search.php @@ -0,0 +1,79 @@ +<?php +/** + * The template for displaying search results pages. + * + * @package understrap + */ + +if ( ! defined( 'ABSPATH' ) ) { + exit; // Exit if accessed directly. +} + +get_header(); + +$container = get_theme_mod( 'understrap_container_type' ); + +?> + +<div class="wrapper" id="search-wrapper"> + + <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1"> + + <div class="row"> + + <!-- Do the left sidebar check and opens the primary div --> + <?php get_template_part( 'global-templates/left-sidebar-check' ); ?> + + <main class="site-main" id="main"> + + <?php if ( have_posts() ) : ?> + + <header class="page-header"> + + <div class="card taxonomy-card"> + <div class="card-body"> + <h1 class="card-title page-title"><?php printf( + /* translators:*/ + esc_html__( 'Suchergebnisse für: %s', 'understrap' ), + '<span><u class="charter-bold">' . ucfirst(get_search_query()) . '</u></span>' ); ?></h1> + <p class="card-text">Anzahl der Ergebnisse: <?php echo $wp_query->found_posts; ?></p> + </div> + </div> + + </header><!-- .page-header --> + + <?php /* Start the Loop */ ?> + <?php while ( have_posts() ) : the_post(); ?> + + <?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' ); + ?> + + <?php endwhile; ?> + + <?php else : ?> + + <?php get_template_part( 'loop-templates/content', 'none' ); ?> + + <?php endif; ?> + + </main><!-- #main --> + + <!-- The pagination component --> + <?php understrap_pagination(); ?> + + <!-- Do the right sidebar check --> + <?php get_template_part( 'global-templates/right-sidebar-check' ); ?> + + </div><!-- .row --> + +</div><!-- Container end --> + +</div><!-- Wrapper end --> + +<?php get_footer(); ?> |
