Advertisement
Guest User

Untitled

a guest
Dec 4th, 2020
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying search results pages
  4.  *
  5.  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
  6.  *
  7.  * @package mitckliniken
  8.  */
  9.  
  10. get_header();
  11. ?>
  12.  
  13. <?php if (have_posts()) : ?>
  14.  
  15.     <div class="container">
  16.  
  17.         <h1 style="text-align: center; color: #0c380f" class="page-title">
  18.             <?php
  19.             /* translators: %s: search query. */
  20.             printf(esc_html__('Search Results for: %s', 'mitckliniken'), '<span>' . get_search_query() . '</span>');
  21.             ?>
  22.         </h1>
  23.     </div>
  24.  
  25.     <?php
  26.     /* Start the Loop */
  27.     while (have_posts()) :
  28.         the_post();
  29.  
  30.         /**
  31.          * Run the loop for the search to output the results.
  32.          * If you want to overload this in a child theme then include a file
  33.          * called content-search.php and that will be used instead.
  34.          */
  35.         get_template_part('template-parts/content', 'search');
  36.  
  37.     endwhile;
  38.  
  39.     ?>
  40.  
  41.     <div class="container">
  42.         <?php
  43.  
  44.         the_posts_navigation(); ?>
  45.  
  46.     </div>
  47. <?php
  48.  
  49. else :
  50.  
  51.     get_template_part('template-parts/content', 'none');
  52.  
  53. endif;
  54. ?>
  55.     <style>
  56.         .search-results .search-results-row img {
  57.             float: left;
  58.             margin-right: 20px;
  59.         }
  60.  
  61.         article {
  62.             margin-top: 30px;
  63.         }
  64.  
  65.         .entry-summary {
  66.             padding-top: 10px;
  67.         }
  68.         .posts-navigation {
  69.             margin-top: 25px;
  70.         }
  71.     </style>
  72. <?php
  73. get_footer();
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement