在 WooCommerce 中的产品库下显示标题

2023-12-01

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

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 );`

我该如何编辑它?或者说,有什么解决办法吗? 谢谢


确保您了解 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 )
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 WooCommerce 中的产品库下显示标题 的相关文章

随机推荐