1

I am new with woo commerce and i have a task for single product page.
I am editing woo commerce > templates > single product > product-thumbnails.php and trying to display caption with woo commerce thumbnails. I am able to display caption with main image but my code in backend for this template is not working and instead thumbnails are displaying with different html tags. In front end these are displaying in li tags.

<li><img src="http://www.example.com/wp-content/uploads/2016/11/P1070194-1-180x180.jpg" class="flex-active" draggable="false"></li>

In template i have html in this format

$html  = '<div data="working" data-thumb="' . esc_url( $thumbnail[0] ) . '" class="woocommerce-product-gallery__image"><a href="' . esc_url( $full_size_image[0] ) . '">';
 $html .= wp_get_attachment_image( $attachment_id, 'shop_single', false, $attributes );
 $html .= '</a></div>';

I do not have idea to display these on front end. Any help will be much appreciated. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.