Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Putting between product title and excerpt

Home / Forums / Virtue Theme / Putting between product title and excerpt

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
June 9, 2020 at 12:53 am

Hello 🙂

1. I’d like to put a thing between product title and excerpt, I’ve tried this hook ‘woocommerce_after_shop_loop_item_title’ and it sat after excerpt.
2. Also is it possible to put right below image, want to see which one is good.

This is the code I used
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();
$product_excerpt = $product->post->post_excerpt;
$brands = wp_get_post_terms( $product_id, 'pwb-brand' );
foreach( $brands as $brand ) echo '<span></span><a href="'.get_term_link($brand->term_id).'">'.$brand->name.'</a><br>';

Thanks always 🙂

  • The forum ‘Virtue Theme’ is closed to new topics and replies.