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 | |
App::uses('AppHelper', 'View/Helper'); | |
class MyHelper extends AppHelper{ | |
public function assignTitle($pageTitle){ | |
return $this->_View->assign('pageTitle', $pageTitle); | |
} | |
} | |
?> |
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
add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX); | |
function enqueue_child_theme_styles() { | |
wp_dequeue_style( 'media_center-preset-color' ); | |
wp_enqueue_style( 'child-custom-style', get_stylesheet_directory_uri() . '/assets/css/custom-color.css', array('media_center-main-style') ); | |
} |
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
function mybeth_change_charity_store_text() { | |
return esc_html__( 'Our Custom Store Text', 'bethlehem' ); | |
} | |
add_filter( 'our_store_carousel_title', 'mybeth_change_charity_store_text' ); |
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' ); | |
} |
OlderNewer