content-product.php … post thumbnail hook
-
I try to set the post thumbnail in the content-product.php apart from headline and other text in the product grid and group all text there in a div.
This works great in the “normal” shop loop, but not at related products or my custom product loop on the homepage.It seems the “normal” shop loop uses the woocommerce_before_shop_loop_item hook to output the thumbnail and in the other cases the woocommerce_before_shop_loop_item_title hook ist used and woocommerce_before_shop_loop_item outputs nothing.
Is there any way to change this or to work around this?
I tried to move the woocommerce_before_shop_loop_item_title outside the headline anchor, but if I do so the post thumbnail misses a link around it.Links: 1. normal shop loop
2. related products loopP.S. Maybe I should add the following: archive-product.php and related.php both use content-product.php to display one product in a product grid, but different hooks (and so the thumbnail is placed at different places) are used to include the post thumbnail.
The topic ‘content-product.php … post thumbnail hook’ is closed to new replies.