333bb999 by Jeff Balicki

search

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 33af68b9
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
if ( is_front_page() ) {
get_template_part( 'global-templates/hero' );
}
$wrapper_id = 'full-width-page-wrapper';
?>
<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'); ?>);">
<div class="full-image">
<?php $hero_content = apply_filters('the_content', get_post_meta(get_the_id(), 'hero_content', true));
if (!empty($hero_content)) {?>
<div class="container">
<div class="hero-content row">
<div class="col align-self-center">
<?php echo $hero_content; ?>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<div class="wrapper" id="<?php echo $wrapper_id; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok. ?>">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<div class="col-md-12 content-area" id="primary">
<main class="site-main" id="main" role="main">
<h3>Search Result for : <?php echo htmlentities($s, ENT_QUOTES, 'UTF-8'); ?> </h3>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="posts">
<article>
<h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
<p><?php the_excerpt(); ?></p>
<p align="right"><a href="<?php the_permalink(); ?>">Read More</a></p>
<span class="post-meta"> Post By <?php the_author(); ?>
| Date : <?php echo date('j F Y'); ?></span>
</article><!-- #post -->
</div>
<?php endwhile; ?>
<?php endif; ?>
</main>
</div><!-- #primary -->
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #<?php echo $wrapper_id; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok. ?> -->
<?php
get_footer();
......@@ -14824,8 +14824,13 @@ input[type=checkbox] {
top: -10px;
left: -56px;
}
#search .search-form .search-submit:hover {
background-color: #2c2c2c;
}
#search .close {
all: unset;
position: relative;
top: -10px;
display: inline-block;
font-size: 0px;
width: 30px;
......@@ -14833,6 +14838,9 @@ input[type=checkbox] {
background-size: contain;
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");
}
#search .close:hover {
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");
}
#search.open {
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() {
}
add_action( 'customize_controls_enqueue_scripts', 'understrap_child_customize_controls_js' );
function template_chooser($template)
{
global $wp_query;
$post_type = get_query_var('post_type');
if( $wp_query->is_search )
{
return locate_template('archive-search.php'); // redirect to archive-search.php
}
return $template;
}
add_filter('template_include', 'template_chooser');
\ No newline at end of file
......
......@@ -33655,7 +33655,7 @@
document.documentElement.scrollTop = 0;
}
$__default["default"](document).ready(function ($) {
$(document).on("click", ".search-button a", function (e) {
$(document).on("click", ".search-button a, .close", function (e) {
e.preventDefault();
$('#search').toggleClass('open');
});
......
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() {
jQuery(document).ready(function($) {
$(document).on("click", ".search-button a", function(e) {
$(document).on("click", ".search-button a, .close", function(e) {
e.preventDefault();
$('#search').toggleClass('open');
......
......@@ -211,17 +211,25 @@
top: -10px;
left: -56px;
}
.search-submit:hover{
background-color: #2c2c2c;
}
}
.close{
all: unset;
position: relative;
top: -10px;
display: inline-block;
font-size: 0px;
width: 30px;
height: 30px;
background-size: contain;
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");
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");
}
.close:hover{
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");
}
}
#search.open{
display: block;
width: 100%;
......