Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Ibrahim ibndawood

💭
I may be slow to respond.
View GitHub Profile
@ibndawood
ibndawood / style.css
Created Aug 13, 2020
Electro v2 - Footer background color
View style.css
.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 / searchform.php
Created May 29, 2020
Bethlehem - clickable search icon
View searchform.php
<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 / functions.php
Created May 28, 2020
Electro v2 - Move Rewards message below cart
View functions.php
add_action( 'init', 'ec_child_print_rewards_message', 20 );
function ec_child_print_rewards_message() {
if ( function_exists( 'YITH_WC_Points_Rewards_Frontend' ) ) {
remove_action( 'woocommerce_before_cart', array( YITH_WC_Points_Rewards_Frontend::get_instance(), 'print_rewards_message_in_cart' ) );
add_action( 'woocommerce_before_cart_collaterals', array( YITH_WC_Points_Rewards_Frontend::get_instance(), 'print_rewards_message_in_cart' ) );
}
}
@ibndawood
ibndawood / functions.php
Created May 28, 2020
Electro v2 - Integration with YITH WooCommerce Points and Rewards
View functions.php
add_filter( 'yith_par_messages_class', 'ec_child_remove_messages_class' );
function ec_child_remove_messages_class( $classes ) {
return array(
'woocommerce-cart-notice',
'woocommerce-cart-notice-minimum-amount',
'alert alert-warning'
);
}
@ibndawood
ibndawood / functions.php
Created May 26, 2020
Electro v2 - Copyright text in Mobile Footer
View functions.php
add_action( 'init', 'ec_child_footer_credit', 10 );
function ec_child_footer_credit() {
add_action( 'electro_footer_v2_handheld', 'electro_footer_credit', 75 );
add_action( 'electro_mobile_footer_v1', 'electro_footer_credit', 75 );
add_action( 'electro_mobile_footer_v2', 'electro_footer_credit', 75 );
}
function electro_footer_credit() {
$website_title_with_url = sprintf( '<a href="%s">%s</a>', esc_url( home_url( '/' ) ), get_bloginfo( 'name' ) );
@ibndawood
ibndawood / functions.php
Created May 26, 2020
Vodi - Change "Up Next" title
View functions.php
add_filter( 'vodi_template_single_video_prev_next_videos_title', 'vd_child_change_prev_next_videos_title', 10 );
function vd_child_change_prev_next_videos_title( $title ) {
return esc_html__( 'Coming Up', 'vodi' );
}
@ibndawood
ibndawood / functions.php
Created May 26, 2020
Vodi - Remove Related Videos
View functions.php
add_action( 'init', 'vd_child_remove_related_videos', 10 );
function vd_child_remove_related_videos() {
remove_action( 'masvideos_after_single_video_summary', 'masvideos_related_videos', 50 );
}
@ibndawood
ibndawood / functions.php
Created May 26, 2020
Front Jobs - Remove "About Job" / Job Excerpt from Grid and List View
View functions.php
function front_job_listing_grid_card_body_content() {
?>
<div class="text-center">
<div class="u-lg-avatar mx-auto mb-3 position-relative">
<?php front_the_company_logo( 'thumbnail' , 'img-fluid' , false ); ?>
<?php front_the_job_status(); ?>
</div>
<div class="mb-4">
<h1 class="h5 mb-1">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
@ibndawood
ibndawood / v1.php
Created May 26, 2020
Footer Default v1 - Add social menu below footer
View v1.php
<?php
/**
* Template for default v1
* @since 1.0.0
*/
?>
<footer class="site-footer site-footer__default style-v1">
<div class="footer-widgets border-bottom">
<?php if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) : ?>
<div class="container space-2">
@ibndawood
ibndawood / functions.php
Created May 24, 2020
MAS Videos - Declare Support for MAS Videos plugin
View functions.php
function mytheme_add_masvideos_support() {
add_theme_support( 'masvideos' );
}
add_action( 'after_setup_theme', 'mytheme_add_masvideos_support' );
You can’t perform that action at this time.