Skip to content

Instantly share code, notes, and snippets.

View ibndawood's full-sized avatar
💭
I may be slow to respond.

Kader Ibrahim S ibndawood

💭
I may be slow to respond.
View GitHub Profile
@ibndawood
ibndawood / searchform.php
Created May 29, 2020 13:48
Bethlehem - clickable search icon
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<style>.search-form:after{content:none!important;}</style>
<div style="display:flex">
<label>
<span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" style="border-top-right-radius: 0; border-bottom-right-radius: 0;border-right:0;" />
</label>
<button type="submit" class="search-submit" style="background:#fff;border:none;padding:0;position:static !important;clip:inherit;height: 36px;border: 1px solid #cbc6ac;border-radius: 30px;border-left: 0;padding-right: 16px;border-top-left-radius: 0;border-bottom-left-radius: 0;"><i class="fa fa-search"></i></button>
</div>
</form>
@ibndawood
ibndawood / style.css
Created August 13, 2020 06:57
Electro v2 - Footer background color
.copyright-bar,
.desktop-footer .footer-bottom-widgets {
background-color: #000;
color: #fff;
}
.footer-bottom-widgets ul>li>a,
.copyright-bar a{
color: #fff;
}
@ibndawood
ibndawood / functions.php
Last active March 27, 2021 12:25
Electro - Home v2 keep "All Departments" menu open
function electro_departments_menu() {
?>
<ul class="nav navbar-nav departments-menu animate-dropdown">
<li class="nav-item dropdown open">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" id="departments-menu-toggle">
<?php echo apply_filters( 'electro_departments_menu_title', esc_html__( 'Shop by Department', 'electro' ) ); ?>
</a>
<?php
wp_nav_menu( array(
'theme_location' => 'departments-menu',
@ibndawood
ibndawood / functions.php
Created July 24, 2018 06:11
Electro v2 - Do not show dropdown by default in header
add_filter( 'electro_departments_menu_v2_enable_dropdown', '__return_true', 99 );
@ibndawood
ibndawood / style.css
Created December 15, 2017 04:02
Electro - Remove greyscale for Google Maps in contact v2
.store-info iframe {
-webkit-filter: none;
filter: none;
}
@ibndawood
ibndawood / form.html
Created August 17, 2018 14:00
Electro v2 - Mailchimp form newsletter
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="https://protools.us17.list-manage.com/subscribe/post?u=d255223a3b89ccd2f6a7526a5&amp;id=b8beeacab6" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll" class="input-group">
<input type="email" value="" name="EMAIL" class="email form-control" id="mce-EMAIL" placeholder="Tu email." required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_d255223a3b89ccd2f6a7526a5_b8beeacab6" tabindex="-1" value=""></div>
<span class="input-group-btn">
<button class="btn btn-secondary" id="mc-embedded-subscribe" type="submit">Subscribe</button>
@ibndawood
ibndawood / form.html
Last active February 21, 2021 23:56
Electro - Subscription form using Contact Form 7
<div class="input-group">[text* your-email class:form-control placeholder "Enter your email address"]<span class="input-group-btn">[submit class:btn class:btn-secondary "Sign Up"]</span></div>
@ibndawood
ibndawood / functions.php
Created February 8, 2019 06:38
Electro v2 - Add star rating/review in product item loop
add_action( 'woocommerce_shop_loop_item_title', 'electro_template_loop_rating', 43 );
@ibndawood
ibndawood / functions.php
Created July 4, 2019 07:04
Electro v2 - Do not show savings if the product is not on sale
function electro_onsale_product( $args = array() ) {
if ( is_woocommerce_activated() ) {
$defaults = array(
'section_title' => wp_kses_post( __( '<span class="highlight">Special</span> Offer', 'electro' ) ),
'section_class' => '',
'show_savings' => true,
'savings_in' => 'amount',
'savings_text' => esc_html__( 'Save', 'electro' ),
@ibndawood
ibndawood / functions.php
Created September 18, 2017 08:03
Electro - Custom HTML after add to cart
add_action( 'woocommerce_single_product_summary', 'ec_child_add_custom_HTML_after_cart_button', 40 );
function ec_child_add_custom_HTML_after_cart_button() {
?><img src="//placehold.it/500x200" alt="" /><?php
}