333bb999 by Jeff Balicki

search

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 33af68b9
1 <?php
2 /**
3 * The template for displaying all pages
4 *
5 * This is the template that displays all pages by default.
6 * Please note that this is the WordPress construct of pages
7 * and that other 'pages' on your WordPress site will use a
8 * different template.
9 *
10 * @package Understrap
11 */
12
13 // Exit if accessed directly.
14 defined( 'ABSPATH' ) || exit;
15
16 get_header();
17 $container = get_theme_mod( 'understrap_container_type' );
18
19 if ( is_front_page() ) {
20 get_template_part( 'global-templates/hero' );
21 }
22
23 $wrapper_id = 'full-width-page-wrapper';
24
25 ?>
26 <div class="hero-container header-section blur-image" data-src="<?php echo the_post_thumbnail_url(); ?>" style="--med-image: url(<?php echo the_post_thumbnail_url('medium'); ?>);">
27 <div class="full-image">
28 <?php $hero_content = apply_filters('the_content', get_post_meta(get_the_id(), 'hero_content', true));
29 if (!empty($hero_content)) {?>
30 <div class="container">
31 <div class="hero-content row">
32 <div class="col align-self-center">
33 <?php echo $hero_content; ?>
34 </div>
35 </div>
36 </div>
37 <?php } ?>
38 </div>
39 </div>
40 <div class="wrapper" id="<?php echo $wrapper_id; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok. ?>">
41
42 <div class="<?php echo esc_attr( $container ); ?>" id="content">
43
44 <div class="row">
45
46 <div class="col-md-12 content-area" id="primary">
47
48 <main class="site-main" id="main" role="main">
49
50 <h3>Search Result for : <?php echo htmlentities($s, ENT_QUOTES, 'UTF-8'); ?> </h3>
51 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
52 <div id="post-<?php the_ID(); ?>" class="posts">
53 <article>
54 <h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
55 <p><?php the_excerpt(); ?></p>
56 <p align="right"><a href="<?php the_permalink(); ?>">Read More</a></p>
57 <span class="post-meta"> Post By <?php the_author(); ?>
58 | Date : <?php echo date('j F Y'); ?></span>
59
60 </article><!-- #post -->
61 </div>
62 <?php endwhile; ?>
63 <?php endif; ?>
64
65 </main>
66
67 </div><!-- #primary -->
68
69 </div><!-- .row -->
70
71 </div><!-- #content -->
72
73 </div><!-- #<?php echo $wrapper_id; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok. ?> -->
74
75 <?php
76 get_footer();
...@@ -14824,8 +14824,13 @@ input[type=checkbox] { ...@@ -14824,8 +14824,13 @@ input[type=checkbox] {
14824 top: -10px; 14824 top: -10px;
14825 left: -56px; 14825 left: -56px;
14826 } 14826 }
14827 #search .search-form .search-submit:hover {
14828 background-color: #2c2c2c;
14829 }
14827 #search .close { 14830 #search .close {
14828 all: unset; 14831 all: unset;
14832 position: relative;
14833 top: -10px;
14829 display: inline-block; 14834 display: inline-block;
14830 font-size: 0px; 14835 font-size: 0px;
14831 width: 30px; 14836 width: 30px;
...@@ -14833,6 +14838,9 @@ input[type=checkbox] { ...@@ -14833,6 +14838,9 @@ input[type=checkbox] {
14833 background-size: contain; 14838 background-size: contain;
14834 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1458' data-name='Group 1458' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cline id='Line_3' data-name='Line 3' x2='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); 14839 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1458' data-name='Group 1458' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cline id='Line_3' data-name='Line 3' x2='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
14835 } 14840 }
14841 #search .close:hover {
14842 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1499' data-name='Group 1499' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cpath id='Path_1922' data-name='Path 1922' d='M0 0 29.754 29.754' transform='translate(0 0)' fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
14843 }
14836 14844
14837 #search.open { 14845 #search.open {
14838 display: block; 14846 display: block;
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -94,3 +94,14 @@ function understrap_child_customize_controls_js() { ...@@ -94,3 +94,14 @@ function understrap_child_customize_controls_js() {
94 } 94 }
95 add_action( 'customize_controls_enqueue_scripts', 'understrap_child_customize_controls_js' ); 95 add_action( 'customize_controls_enqueue_scripts', 'understrap_child_customize_controls_js' );
96 96
97 function template_chooser($template)
98 {
99 global $wp_query;
100 $post_type = get_query_var('post_type');
101 if( $wp_query->is_search )
102 {
103 return locate_template('archive-search.php'); // redirect to archive-search.php
104 }
105 return $template;
106 }
107 add_filter('template_include', 'template_chooser');
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -33655,7 +33655,7 @@ ...@@ -33655,7 +33655,7 @@
33655 document.documentElement.scrollTop = 0; 33655 document.documentElement.scrollTop = 0;
33656 } 33656 }
33657 $__default["default"](document).ready(function ($) { 33657 $__default["default"](document).ready(function ($) {
33658 $(document).on("click", ".search-button a", function (e) { 33658 $(document).on("click", ".search-button a, .close", function (e) {
33659 e.preventDefault(); 33659 e.preventDefault();
33660 $('#search').toggleClass('open'); 33660 $('#search').toggleClass('open');
33661 }); 33661 });
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -69,7 +69,7 @@ function backToTop() { ...@@ -69,7 +69,7 @@ function backToTop() {
69 69
70 70
71 jQuery(document).ready(function($) { 71 jQuery(document).ready(function($) {
72 $(document).on("click", ".search-button a", function(e) { 72 $(document).on("click", ".search-button a, .close", function(e) {
73 e.preventDefault(); 73 e.preventDefault();
74 $('#search').toggleClass('open'); 74 $('#search').toggleClass('open');
75 75
......
...@@ -211,9 +211,14 @@ ...@@ -211,9 +211,14 @@
211 top: -10px; 211 top: -10px;
212 left: -56px; 212 left: -56px;
213 } 213 }
214 .search-submit:hover{
215 background-color: #2c2c2c;
216 }
214 } 217 }
215 .close{ 218 .close{
216 all: unset; 219 all: unset;
220 position: relative;
221 top: -10px;
217 display: inline-block; 222 display: inline-block;
218 font-size: 0px; 223 font-size: 0px;
219 width: 30px; 224 width: 30px;
...@@ -221,7 +226,10 @@ ...@@ -221,7 +226,10 @@
221 background-size: contain; 226 background-size: contain;
222 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1458' data-name='Group 1458' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cline id='Line_3' data-name='Line 3' x2='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"); 227 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1458' data-name='Group 1458' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cline id='Line_3' data-name='Line 3' x2='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%23156570' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
223 } 228 }
229 .close:hover{
230 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1499' data-name='Group 1499' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cpath id='Path_1922' data-name='Path 1922' d='M0 0 29.754 29.754' transform='translate(0 0)' fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
224 } 231 }
232 }
225 #search.open{ 233 #search.open{
226 display: block; 234 display: block;
227 width: 100%; 235 width: 100%;
......