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 catalog_mode_add_to_cart_link( $link, $product ){ | |
global $media_center_theme_options, $woocommerce_loop; | |
$product_item_size = isset( $woocommerce_loop['product_item_size'] ) ? $woocommerce_loop['product_item_size'] : $media_center_theme_options['product_item_size']; | |
$btn_classes = 'le-button'; | |
$btn_classes .= ( $product_item_size == 'size-big' ) ? 'big' : ''; | |
if ( ( isset( $media_center_theme_options['catalog_mode'] ) ) && ( $media_center_theme_options['catalog_mode'] == 1 ) ) { | |
$link = '<div class="add-cart-button"><a href="'. $product->get_permalink() . '" rel="nofollow" class="' . $btn_classes . '">View Product</a></div>'; |
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( 'woocommerce_get_price_html', 'show_price_only_to_registered_users', PHP_INT_MAX ); | |
function show_price_only_to_registered_users( $price ) { | |
if( ! is_user_logged_in() ){ | |
return __( 'Please register to view prices', 'theme_name' ); | |
} else { | |
return $price; | |
} | |
} |
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( 'mc_shop_by_department', 'mc_change_shop_by_department', PHP_INT_MAX ); | |
function mc_change_shop_by_department(){ | |
return 'Shop Categories'; // Your custom text here | |
} |
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
.product-title > a, .product-title > a:hover, .product-title > a:focus, .product-title > a:active{ | |
color: #00FF00; | |
} |
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_before_shop_loop_item_title', 'mc_make_availability_like_ribbon', 25 ); | |
function mc_make_availability_like_ribbon() { | |
global $product; | |
$availability = $product->get_availability(); | |
$stock_status = $availability['class']; | |
if( $stock_status == 'out-of-stock' ) { | |
$label = __( 'Out of Stock', 'mediacenter' ) ; |
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 woocommerce_products_live_search(){ | |
if ( isset( $_REQUEST['fn'] ) && 'get_ajax_search' == $_REQUEST['fn'] ) { | |
$query_args = array( | |
'posts_per_page' => 10, | |
'no_found_rows' => true, | |
'post_type' => 'product', | |
); | |
if( isset( $_REQUEST['terms'] ) ) { |
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
<?php | |
add_filter( 'blog_archive_link_text', 'beth_child_change_archive_link_text' ); | |
function beth_child_change_archive_link_text( $text ) { | |
return __( 'Your Text', 'bethlehem' ); | |
} |
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
<?php | |
function bethlehem_navigation_links() { | |
$header = bethlehem_get_header(); | |
?> | |
<div class="top-nav-links"> | |
<?php if( $header == 'header-7' ) : ?> | |
<ul> | |
<li class="events-link"> | |
<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"><i class="fa fa-calendar"></i><?php echo __( 'Calendar', 'bethlehem' ); ?></a> | |
</li> |
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
$('body').on('added_to_cart', function(){ | |
$('.product-item').unblock(); // Unblock the product item | |
$('.cart-item').unblock(); | |
$('.compare-list').unblock(); | |
$('html,body').animate({ | |
scrollTop: $('.top-cart-holder').offset().top - 20 | |
}, 1000, function(){ | |
$('.top-cart-holder .dropdown-toggle').dropdown('toggle'); |
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
<?php | |
function media_center_department_nav_menu(){ | |
$department_nav_menu = ''; | |
$department_nav_menu .= '<ul class="dropdown-menu">'; | |
$department_nav_menu .= wp_list_categories( | |
array( | |
'title_li' => '', | |
'hide_empty' => 1 , | |
'taxonomy' => 'product_cat', |
OlderNewer