search.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * The template for displaying search results pages.
  4. *
  5. * @package Dyad
  6. */
  7. get_header(); ?>
  8. <main id="primary" class="content-area" role="main">
  9. <header class="page-header">
  10. <h1 class="page-title">
  11. <?php printf( esc_html__( 'Search Results for: %s', 'dyad-2' ), '<span>' . get_search_query() . '</span>' ); ?>
  12. </h1>
  13. </header>
  14. <?php if ( have_posts() ) : ?>
  15. <div id="posts" class="posts">
  16. <?php /* Start the Loop */ ?>
  17. <?php while ( have_posts() ) : the_post(); ?>
  18. <?php
  19. /*
  20. * Include the Post-Format-specific template for the content.
  21. * If you want to override this in a child theme, then include a file
  22. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  23. */
  24. get_template_part( 'template-parts/content', 'blocks' );
  25. ?>
  26. <?php endwhile; ?>
  27. </div><!-- .posts -->
  28. <?php the_posts_navigation(); ?>
  29. <?php else : ?>
  30. <div id="posts" class="posts">
  31. <?php get_template_part( 'template-parts/content', 'none' ); ?>
  32. </div>
  33. <?php endif; ?>
  34. </main><!-- #main -->
  35. <?php get_footer(); ?>