Skip to content

Instantly share code, notes, and snippets.

@cam5
cam5 / single-product-reviews-excerpt.php
Created September 18, 2013 00:24
I used a few lines in the `single-product-reviews.php` woocommerce template to unhook jetpack on only product pages. Otherwise, it overrides the review form. Just calling the `Jetpack_Comments` class and removing those actions before the `comment_form()` was enough to selectively deactivate 'em. Note: your `single-product-reviews.php` might be i…
$jp = new Jetpack_Comments;
remove_action('comment_form_before', array($jp, 'comment_form_before'));
remove_action('comment_form_after', array($jp, 'comment_form_after'));`
comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );
@jameskoster
jameskoster / functions.php
Created January 12, 2012 16:58
WooCommerce - Change number of products per row
// Change number or products per row to 3
add_filter('loop_shop_columns', 'loop_columns');
if (!function_exists('loop_columns')) {
function loop_columns() {
return 3; // 3 products per row
}
}