| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying Search Results pages. |
|---|
| 4 | * |
|---|
| 5 | * @package GeneratePress |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | get_header(); ?> |
|---|
| 9 | |
|---|
| 10 | <section id="primary" <?php generate_content_class(); ?> itemprop="mainContentOfPage"> |
|---|
| 11 | <main id="main" <?php generate_main_class(); ?> itemtype="http://schema.org/SearchResultsPage" itemscope="itemscope" role="main"> |
|---|
| 12 | <?php do_action('generate_before_main_content'); ?> |
|---|
| 13 | <?php if ( have_posts() ) : ?> |
|---|
| 14 | |
|---|
| 15 | <header class="page-header"> |
|---|
| 16 | <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'generate' ), '<span>' . get_search_query() . '</span>' ); ?></h1> |
|---|
| 17 | </header><!-- .page-header --> |
|---|
| 18 | |
|---|
| 19 | <?php /* Start the Loop */ ?> |
|---|
| 20 | <?php while ( have_posts() ) : the_post(); ?> |
|---|
| 21 | |
|---|
| 22 | <?php get_template_part( 'content', 'search' ); ?> |
|---|
| 23 | |
|---|
| 24 | <?php endwhile; ?> |
|---|
| 25 | |
|---|
| 26 | <?php generate_content_nav( 'nav-below' ); ?> |
|---|
| 27 | |
|---|
| 28 | <?php else : ?> |
|---|
| 29 | |
|---|
| 30 | <?php get_template_part( 'no-results', 'search' ); ?> |
|---|
| 31 | |
|---|
| 32 | <?php endif; ?> |
|---|
| 33 | <?php do_action('generate_after_main_content'); ?> |
|---|
| 34 | </main><!-- #main --> |
|---|
| 35 | </section><!-- #primary --> |
|---|
| 36 | |
|---|
| 37 | <?php do_action('generate_sidebars'); ?> |
|---|
| 38 | <?php get_footer(); ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.