在WooCommerce

时间:2016-09-20 11:11:00

标签: wordpress woocommerce hook-woocommerce

我正在尝试在产品页面库中的缩略图下显示标题文字。我需要显示文本,因为图库中有很多图像,每个拇指都是引擎的一部分,名称可以帮助用户。

WooCommerce产品页面中的图库代码为:

echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<li data-thumb="%s">%s%s<a href="%s" class="%s lightbox" data-rel="ilightbox[product]" data-caption="%s" title="%s" alt="%s"><i class="fa-search-plus"></i></a></li>', $thumb_image, $image_html, $caption_html, $image_link, $image_class, $image_caption, $image_title, $image_alt ), $attachment_id, $post->ID, $image_class );`

我该如何编辑?或者,有什么解决方案吗? 感谢

1 个答案:

答案 0 :(得分:0)

确保您了解sprint功能的工作方式。 你可以玩块的css位置。这可能是解决方案。

sprintf( '<li data-thumb="%s">%s<span style="postition:...">%s</span><a href="%s" class="%s lightbox" data-rel="ilightbox[product]" data-caption="%s" title="%s" alt="%s"><i class="fa-search-plus"></i></a></li>', $thumb_image, $image_html, $caption_html, $image_link, $image_class, $image_caption, $image_title, $image_alt )
相关问题