Sfoglia il codice sorgente

Morden: Fix Search Results header background color. Closes #1635

Danny Dudzic 5 anni fa
parent
commit
67750307d2
4 ha cambiato i file con 62 aggiunte e 3 eliminazioni
  1. 1 1
      morden/sass/style-child-theme.scss
  2. 59 0
      morden/search.php
  3. 1 1
      morden/style-rtl.css
  4. 1 1
      morden/style.css

+ 1 - 1
morden/sass/style-child-theme.scss

@@ -5,7 +5,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Requires at least: WordPress 4.9.6
-Version: 1.4.0
+Version: 1.4.1
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: varia

+ 59 - 0
morden/search.php

@@ -0,0 +1,59 @@
+<?php
+/**
+ * The template for displaying search results pages
+ *
+ * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
+ *
+ * @package WordPress
+ * @subpackage Morden
+ * @since 1.4.1
+ */
+
+get_header();
+?>
+
+	<section id="primary" class="content-area">
+		<main id="main" class="site-main">
+
+		<?php if ( have_posts() ) : ?>
+
+			<header class="page-header">
+				<?php
+				printf(
+					/* translators: 1: search result title. 2: search term. */
+					'<h1 class="page-title">%1$s <span class="page-description search-term">%2$s</span></h1>',
+					__( 'Search results for:', 'varia' ),
+					get_search_query()
+				);
+				?>
+			</header><!-- .page-header -->
+
+			<?php
+			// Start the Loop.
+			while ( have_posts() ) :
+				the_post();
+
+				/*
+				 * Include the Post-Format-specific template for the content.
+				 * If you want to override this in a child theme, then include a file
+				 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+				 */
+				get_template_part( 'template-parts/content/content', 'excerpt' );
+
+				// End the loop.
+			endwhile;
+
+			// Previous/next page navigation.
+			varia_the_posts_navigation();
+
+			// If no content, include the "No posts found" template.
+		else :
+			get_template_part( 'template-parts/content/content', 'none' );
+
+		endif;
+		?>
+		</main><!-- #main -->
+	</section><!-- #primary -->
+
+<?php
+get_footer();

+ 1 - 1
morden/style-rtl.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Requires at least: WordPress 4.9.6
-Version: 1.4.0
+Version: 1.4.1
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: varia

+ 1 - 1
morden/style.css

@@ -6,7 +6,7 @@ Author: Automattic
 Author URI: https://automattic.com/
 Description: Morden is a functional and responsive multi-purpose theme that is the perfect solution for your business's online presence.
 Requires at least: WordPress 4.9.6
-Version: 1.4.0
+Version: 1.4.1
 License: GNU General Public License v2 or later
 License URI: LICENSE
 Template: varia