nsekeris
Forum Replies Created
-
I get the same error too. No recent changes or updates.
Edit: It simply disappeared as it appeared.
- This reply was modified 9 months ago by nsekeris.
No, i didn’t. When i use the hook woocommerce_after_shop_item_title it is displayed below the price, with the hook woocommerce_before_shop_item_title it is displayed above the product image and with the hook woocommerce_shop_item_title the page is messed up.
The priority didn’t work for me.
Update:
It is placed in the wrong class, can you assist me in assigning echo to the correct div or class please ?Thank you.
Hi!
I would like to display a product tag below the image along with the title. I know that the hook is woocommerce_shop_loop_item_title but if i use it, it makes a mess. Same happens if i use the hook woocommerce_after_shop_loop_item, only with the hook woocommerce_after_shop_loop_item_title the tags are displayed under the price. I used the code below:
add_action( 'woocommerce_after_shop_loop_item_title', 'aq_display_brand_before_title'); function aq_display_brand_before_title(){ global $product; $product_id = $product->get_id(); $brands = wp_get_post_terms( $product_id, 'product_tag' ); foreach( $brands as $brand ) echo '<p class="t-entry-text">'.$brand->name.'</p>'; }
Is it possible to apply it site widely?
Any help would be appreciated.Thank you