Last active
June 15, 2021 10:38
-
-
Save ibndawood/ada092082c6ffc1cacbe975cc4d636b9 to your computer and use it in GitHub Desktop.
Electro v2 - Advanced Woo Search Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function electro_navbar_search() { | |
if ( ! apply_filters( 'electro_use_third_party_navbar_search', false ) ) { | |
electro_get_template( 'sections/navbar-search.php' ); | |
} else { | |
do_action( 'electro_navbar_search_third_party' ); | |
} | |
} | |
if ( ! function_exists( 'electro_is_advanced_woo_search_activated' ) ) { | |
function electro_is_advanced_woo_search_activated() { | |
return function_exists( 'aws_get_search_form' ); | |
} | |
} | |
if ( electro_is_advanced_woo_search_activated() ) { | |
add_action( 'init', 'electro_aws_search_form_hooks' ); | |
if ( ! function_exists( 'electro_aws_search_form_hooks' ) ) { | |
function electro_aws_search_form_hooks() { | |
add_filter( 'electro_use_third_party_navbar_search', '__return_true', 10 ); | |
add_action( 'electro_navbar_search_third_party', 'electro_aws_search_form', 10 ); | |
} | |
} | |
if ( ! function_exists( 'electro_aws_search_form' ) ) { | |
function electro_aws_search_form() { | |
if ( is_woocommerce_activated() ) : ?> | |
<div class="navbar-search"><?php | |
aws_get_search_form(); | |
?></div> | |
<?php | |
endif; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.aws-container .aws-search-form { | |
height: 41px; | |
} | |
.aws-container .aws-search-form .aws-loader { | |
right: 20px; | |
} | |
.aws-container .aws-search-form .aws-search-clear span { | |
top: 0; | |
margin-top: 0; | |
} | |
.aws-search-result { | |
border-radius: 6px; | |
overflow: hidden; | |
margin-top: 0px; | |
} | |
.aws-container .aws-search-field { | |
border-width: 2px; | |
border-radius: 2.467em !important; | |
padding: .3em 2.134em; | |
height: 41px; | |
font-size: 15px; | |
background-color: #fff; | |
} | |
.aws-container .aws-search-form .aws-search-clear { | |
width: 60px; | |
border-top-right-radius: 2.467em !important; | |
border-bottom-right-radius: 2.467em !important; | |
background-color: #fed700; | |
color: #333e48; | |
align-items: center; | |
margin: 0; | |
padding: 0; | |
justify-content: center; | |
display: flex !important; | |
} | |
.aws-search-form:not(.aws-form-active):not(.aws-processing) .aws-search-clear span, | |
.aws-search-form.aws-processing .aws-search-clear span { | |
display: none; | |
} | |
.aws-search-form:not(.aws-form-active):not(.aws-processing) .aws-search-clear::after { | |
font-family: font-electro; | |
content: "\6d"; | |
font-size: 1.714em; | |
} | |
.aws-container .aws-search-form.aws-show-clear.aws-form-active .aws-search-clear { | |
display: flex !important; | |
} | |
.header-v1 .aws-container .aws-search-field, | |
.header-v3 .aws-container .aws-search-field, | |
.header-v6 .aws-container .aws-search-field, | |
.header-v8 .aws-container .aws-search-field { | |
border-color: #fed700; | |
} | |
.header-v2 .aws-container .aws-search-form .aws-search-clear, | |
.header-v4 .aws-container .aws-search-form .aws-search-clear, | |
.header-v5 .aws-container .aws-search-form .aws-search-clear { | |
background-color: #333e48; | |
color: #fff; | |
} | |
.header-v2 .aws-container .aws-search-field, | |
.header-v4 .aws-container .aws-search-field, | |
.header-v5 .aws-container .aws-search-field { | |
border-color: #fff; | |
} | |
.header-v7 .aws-container .aws-search-form .aws-search-clear { | |
width: auto; | |
background-color: transparent; | |
font-size: 11px; | |
} | |
.header-v7 .aws-container .aws-search-field { | |
background-color: transparent; | |
border-radius: 0 !important; | |
border-top-width: 0; | |
border-right-width: 0; | |
border-left-width: 0; | |
padding: .3em 1.134em; | |
border-bottom: 1px solid rgba(51,62,72,.3); | |
} | |
@media (min-width: 1480px) { | |
.header-v7 .aws-container .aws-search-field { | |
min-width: 242px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Sir,
How Can I add AWS advanced search in TechMarket