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
/** This code should be added to functions.php of your theme **/ | |
/* Woocommerce - Display Product Category Title on Shop Page */ | |
add_action( 'woocommerce_before_shop_loop_item_title', 'vee_add_product_cat', 25); | |
function vee_add_product_cat() | |
{ | |
global $product; | |
$product_cats = wp_get_post_terms($product->id, 'product_cat'); | |
$count = count($product_cats); | |
foreach($product_cats as $key => $cat) |
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
/** This code should be added to functions.php of your theme **/ | |
/* Woocommerce - Add Product Count View in Each Category */ | |
add_action( 'woocommerce_before_shop_loop', 'add_product_count_view', 20); | |
function add_product_count_view() { | |
$terms = get_the_terms( $post->ID, 'product_cat'); | |
foreach( $terms as $term ) { | |
if(is_tax('product_cat', $term->name)) { | |
echo '<span class="count-view">'.$term->count |
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
/** This code should be added to functions.php of your theme **/ | |
/* Move Woocommerce Tab */ | |
add_action( 'after_setup_theme', 'move_woocommerce_tab' ); | |
function move_woocommerce_tab() { | |
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 1 ); | |
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 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
/** This code should be added to functions.php of your theme **/ | |
/* Display Attributes Terms on Shop Page */ | |
add_action( 'woocommerce_after_shop_loop_item_title', 'vee_add_attributes_terms', 1); | |
function vee_add_attributes_terms() { | |
$attributes_name = get_the_terms( $product->id, 'pa_attribute'); // Replace "pa_attribute" by your attribute | |
if ( $attributes_name && ! is_wp_error( $$attributes_name )): | |
foreach ( $attributes_name as $attributes_name ) | |
{ |
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
/** This code should be added to functions.php of your theme **/ | |
/* Woocommerce - Show min price including Tax for variations rather than Min/Max Prices */ | |
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); | |
function custom_variation_price( $price, $product ) { | |
$price = ''; | |
$price .= woocommerce_price($product->get_price_including_tax()); | |