Skip to content

Instantly share code, notes, and snippets.

View johnmarlow007's full-sized avatar

Marlow johnmarlow007

View GitHub Profile
@thejamescollins
thejamescollins / woocommerce-shop-archives.php
Created May 1, 2015 04:03
WooCommerce wrap product images in the loop (shop/archive pages)
<?php
/**
* Shop/archives: wrap the product image/thumbnail in a div.
*
* The product image itself is hooked in at priority 10 using woocommerce_template_loop_product_thumbnail(),
* so priority 9 and 11 are used to open and close the div.
*/
add_action( 'woocommerce_before_shop_loop_item_title', function(){
echo '<div class="imagewrapper">';