2016-09-20 21 views
2

商品ページのギャラリーのサムネイルの下にキャプションテキストを表示しようとしています。ギャラリーにはたくさんの画像があり、各サムはエンジンの一部であり、その名前がユーザーを助けるため、テキストを表示する必要があります。商品ギャラリーのキャプションを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);` 

どのように私はそれを編集することができますか?または、何か解決策がありますか? ありがとう

答えて

0

スプリント機能が正常に動作することを理解していることを確認してください。 ブロックの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) 
+0

完璧に感謝! – Cronico

関連する問題