Skip to content

Instantly share code, notes, and snippets.

View aslamahamed13's full-sized avatar
💭

Aslam aslamahamed13

💭
  • Chennai, India
  • 16:53 (UTC +05:30)
View GitHub Profile
@aslamahamed13
aslamahamed13 / function.php
Last active September 10, 2018 15:51
Adding background image in home-v2
if( ! function_exists( 'pizzaro_home_v2_hook_control' ) ) {
function pizzaro_home_v2_hook_control() {
if( is_page_template( array( 'template-homepage-v2.php' ) ) ) {
remove_action( 'pizzaro_homepage_v2', 'pizzaro_revslider_v2', isset( $home_v2['sdr']['priority'] ) ? intval( $home_v2['sdr']['priority'] ) : 20 );
add_action( 'pizzaro_homepage_v2', 'pizzaro_v2_background_image', isset( $home_v2['sdr']['priority'] ) ? intval( $home_v2['sdr']['priority'] ) : 20 );
}
}
}
@aslamahamed13
aslamahamed13 / Function.php
Last active November 9, 2018 06:30
Tokoo - Sale Percentage
add_filter( 'woocommerce_after_shop_loop_item_title', 'bbloomer_show_sale_percentage_loop', 30 );
function bbloomer_show_sale_percentage_loop() {
global $product;
if ( $product->is_on_sale() ) {
if ( ! $product->is_type( 'variable' ) ) {
@aslamahamed13
aslamahamed13 / functions.php
Last active January 26, 2019 17:55
Electro - add Line social icon in footer
add_filter( 'electro_set_social_networks', 'ec_child_add_icon', 90 );
function ec_child_add_icon( $args ) {
$args['line'] = array(
'label' => 'line',
'icon' => 'fab fa-line',
'id' => 'line_link',
'link' => 'https://at.line.me/'
);
@aslamahamed13
aslamahamed13 / funtions.php
Last active November 26, 2018 13:10
Pizzaro - Requirment
add_action( 'init', 'pz_child_rearrange_loop_product_header', 20 );
function pz_child_rearrange_loop_product_header() {
add_filter( 'pizzaro_header_v2', 'pizzaro_primary_split_navigation', 40 );
remove_action( 'pizzaro_header_v2', 'pizzaro_header_info_wrapper', 39 );
remove_action( 'pizzaro_header_v2', 'pizzaro_header_navigation_link', 40 );
remove_action( 'pizzaro_header_v2', 'pizzaro_header_info_wrapper_close', 51 );
remove_action( 'pizzaro_header_v2', 'pizzaro_header_cart', 50 );
}
@aslamahamed13
aslamahamed13 / funtions.php
Last active January 26, 2019 17:54
Electro - home-v6 icon as image carousel
if ( ! function_exists( 'electro_home_category_icon_carousel' ) ) {
function electro_home_category_icon_carousel( $args, $carousel_args ) {
$args = wp_parse_args( $args );
$carousel_args = wp_parse_args( $carousel_args );
$args['carousel_args'] = $carousel_args;
$categories = get_terms( 'product_cat' );
@aslamahamed13
aslamahamed13 / funtions.php
Created December 7, 2018 15:29
Electro - Footer call link
if ( ! function_exists( 'electro_footer_call_us' ) ) {
function electro_footer_call_us() {
$call_us_text = apply_filters( 'electro_call_us_text', __( 'Got Questions ? Call us 24/7!', 'electro' ) );
$call_us_number = apply_filters( 'electro_call_us_number', '(800) 8001-8588, (0600) 874 548' );
$call_us_icon = apply_filters( 'electro_call_us_icon' , 'ec ec-support' );
if ( apply_filters( 'electro_footer_call_us', true ) && ! empty( $call_us_number ) ) : ?>
<div class="footer-call-us">
@aslamahamed13
aslamahamed13 / funtions.php
Created December 20, 2018 09:05
Electro - Change logo url link
if ( ! function_exists ( 'electro_header_logo' ) ) {
function electro_header_logo() {
$header_logo_src = apply_filters( 'electro_header_logo_src', get_template_directory_uri() . '/assets/images/logo.png' );
if ( ! empty( $header_logo_src ) ) {
$your_link ='#';
ob_start();
@aslamahamed13
aslamahamed13 / funtions.php
Created January 8, 2019 14:11
Tokoo- remove my account dashboard tab
add_filter ( 'woocommerce_account_menu_items', 'tokoo_child_remove_my_account_links' );
function tokoo_child_remove_my_account_links( $menu_links ){
unset( $menu_links['edit-address'] );
unset( $menu_links['dashboard'] );
return $menu_links;
}
@aslamahamed13
aslamahamed13 / funtions.php
Last active January 11, 2019 15:30
Pizzaro - minimum order amount
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
$minimum = 50;
if ( WC()->cart->total < $minimum ) {
if( is_cart() ) {
@aslamahamed13
aslamahamed13 / funtions.php
Created January 11, 2019 06:22
Electro - Load font awesome 5
add_action( 'wp_enqueue_scripts', 'custom_load_font_awesome' );
function custom_load_font_awesome() {
wp_enqueue_style( 'font-awesome-free', '//use.fontawesome.com/releases/v5.2.0/css/all.css' );
}