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_top_bar() { | |
if ( apply_filters( 'electro_enable_top_bar', true ) ) : ?> | |
<div class="top-bar"> | |
<div class="container"> | |
<?php | |
wp_nav_menu( array( | |
'theme_location' => 'topbar-left', | |
'container' => false, |
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
.header-v3 + .navbar-primary .navbar-nav { | |
text-align: center; | |
} | |
.header-v3 + .navbar-primary .navbar-nav > .menu-item { | |
float: none; | |
display: inline-block; | |
} |
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() { | |
?><div class="navbar-search"><?php get_product_search_form(); ?></div><?php | |
} |
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
add_action( 'init', 'ec_child_rearrange_loop_product_header', 20 ); | |
function ec_child_rearrange_loop_product_header() { | |
remove_action( 'woocommerce_before_shop_loop_item_title', 'electro_template_loop_categories', 20 ); | |
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_open', 25 ); | |
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 30 ); | |
remove_action( 'woocommerce_shop_loop_item_title', 'electro_template_loop_product_thumbnail', 40 ); | |
remove_action( 'electro_product_carousel_alt_content', 'electro_template_loop_product_thumbnail', 20 ); | |
remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_link_close', 45 ); |
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
add_action( 'woocommerce_single_product_summary', 'electro_template_loop_product_sku', 10 ); |
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_template_single_add_to_cart() { | |
global $product; | |
$product_type = electro_wc_get_product_type( $product ); | |
if( electro_get_shop_catalog_mode() == false ) { | |
do_action( 'woocommerce_' . $product_type . '_add_to_cart' ); | |
} elseif( electro_get_shop_catalog_mode() == true && $product->is_type( 'external' ) ) { | |
do_action( 'woocommerce_' . $product_type . '_add_to_cart' ); | |
} elseif( electro_get_shop_catalog_mode() == true && $product->is_type( 'variable' ) ) { | |
remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 ); |
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() { |
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 techmarket_departments_menu() { | |
?> | |
<div id="departments-menu" class="dropdown departments-menu open show"> | |
<?php | |
$departments_menu_title = techmarket_is_woocommerce_activated() ? esc_html__( 'All Departments', 'techmarket' ) : esc_html__( 'Categories', 'techmarket' ); | |
$departments_menu_title = apply_filters( 'techmarket_departments_menu_title', $departments_menu_title ); | |
$departments_menu_icon = apply_filters( 'techmarket_departments_menu_icon', 'tm tm-departments-thin' ); | |
?> | |
<button class="btn dropdown-toggle btn-block" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="<?php echo esc_attr( $departments_menu_icon ); ?>"></i><span><?php echo esc_html( $departments_menu_title ); ?></span></button> | |
<?php |
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 mytheme_add_masvideos_support() { | |
add_theme_support( 'masvideos' ); | |
} | |
add_action( 'after_setup_theme', 'mytheme_add_masvideos_support' ); |
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
add_filter( 'electro_products_carousel_args', 'ec_child_auto_play_carousel' ); | |
add_filter( 'electro_posts_carousel_widget_carousel_args', 'ec_child_auto_play_carousel' ); | |
function ec_child_auto_play_carousel( $args ) { | |
$args['autoplay'] = true; | |
$args['autoplayTimeout'] = 2000; | |
return $args; | |
} | |
add_filter( 'electro_home_v1_product_cards_carousel_args', 'ec_child_auto_play_cards_carousel' ); |