Render Woocommerce Product image
-
This is probably a very simple question, but how can I render the product image so that it displays the magnifying glass.
This is waht I got so far. It will just render the image, but missing the magnifying glass.
add_action( 'woocommerce_grouped_product_list_before_quantity', 'woocommerce_grouped_product_thumbnail' ); function woocommerce_grouped_product_thumbnail( $product ) { $image_size = array( 150, 150 ); $attachment_id = get_post_meta( $product->id, '_thumbnail_id', true ); $attr = array('class' => 'zoom'); ?> <td class="label"> <?php echo wp_get_attachment_image( $attachment_id, $image_size, false, $attr ); ?> </td> <?php }
This piece of code renders the image. Now I would like this image to have the magnifying class or some lightbox effect. Ideally also grouped.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Render Woocommerce Product image’ is closed to new replies.