Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying search results pages.
  4. *
  5. * @package FoundationPress
  6. * @since FoundationPress 1.0.0
  7. */
  8. get_header(); ?>
  9.  
  10. <div class="main-container">
  11. <div class="main-grid">
  12. <main id="search-results" class="main-content">
  13.  
  14. <header>
  15. <h1 class="entry-title"><?php _e( 'Search Results for', 'foundationpress' ); ?> "<?php echo get_search_query(); ?>"</h1>
  16. </header>
  17.  
  18. <?php if ( have_posts() ) : ?>
  19.  
  20. <?php while ( have_posts() ) : the_post(); ?>
  21. <?php get_template_part( 'template-parts/content', get_post_format() ); ?>
  22. <?php endwhile; ?>
  23.  
  24. <?php else : ?>
  25. <?php get_template_part( 'template-parts/content', 'none' ); ?>
  26.  
  27. <?php endif; ?>
  28.  
  29. <?php
  30. if ( function_exists( 'foundationpress_pagination' ) ) :
  31. foundationpress_pagination();
  32. elseif ( is_paged() ) :
  33. ?>
  34. <nav id="post-nav">
  35. <div class="post-previous"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div>
  36. <div class="post-next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div>
  37. </nav>
  38. <?php endif; ?>
  39.  
  40. </main>
  41. <?php get_sidebar(); ?>
  42.  
  43. </div>
  44. </div>
  45. <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement