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
.woocommerce .woocommerce-tabs ul.tabs {display:none !important} |
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
// Display 24 products per page. Goes in functions.php | |
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 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
add_action( 'pre_get_posts', 'custom_pre_get_posts_query' ); | |
function custom_pre_get_posts_query( $q ) { | |
if ( ! $q->is_main_query() ) return; | |
if ( ! $q->is_post_type_archive() ) return; | |
if ( ! is_admin() ) { | |
$q->set( 'tax_query', array(array( | |
'taxonomy' => 'product_cat', | |
'field' => 'slug', | |
'terms' => array( 'PUT YOUR CATEGORY HERE' ), // Don't display products in the membership category on the shop page . For multiple category , separate it with comma. | |
'operator' => 'NOT IN' |
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', 'remove_product_content' ); | |
function remove_product_content() { | |
// If a product in the 'Cookware' category is being viewed... | |
if ( is_product() && has_term( 'Cookware', 'product_cat' ) ) { | |
//... Remove the images | |
remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); | |
// For a full list of what can be removed please see woocommerce-hooks.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
* goes in theme functions.php or a custom plugin | |
// add item to cart on visit | |
add_action( 'init', 'add_product_to_cart' ); | |
function add_product_to_cart() { | |
if ( ! is_admin() ) { | |
global $woocommerce; | |
$product_id = 64; | |
$found = false; | |
//check if product already in cart | |
if ( sizeof( $woocommerce->cart->get_cart() ) > 0 ) { |
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_after_shop_loop_item_title','woocommerce_template_single_excerpt', 5); |
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_product_tabs', 'woo_custom_description_tab', 98 ); | |
function woo_custom_description_tab( $tabs ) { | |
$tabs['description']['callback'] = 'woo_custom_description_tab_content'; // Custom description callback | |
return $tabs; | |
} |
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_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; |
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
.star-rating{float:right;width:80px;height:16px;background:url(images/star.png) repeat-x left 0} | |
.star-rating span{background:url(images/star.png) repeat-x left -32px;height:0;padding-top:16px;overflow:hidden;float:left} | |
.hreview-aggregate .star-rating{margin:10px 0 0 0} | |
#review_form #respond{position:static;margin:0;width:auto;padding:0 0 0;background:transparent none;border:0} | |
#review_form #respond:after{content:"";display:block;clear:both} | |
#review_form #respond p{margin:0 0 10px} | |
#review_form #respond .form-submit input{left:auto} | |
#review_form #respond textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:100%} | |
p.stars:after{content:"";display:block;clear:both} | |
p.stars span{width:80px;height:16px;position:relative;float:left;background:url(images/star.png) repeat-x left 0} |