Hi,
I am using Rehub Theme. I want to dispaly Brand name below image or Below Price in the product Archive. I activated “Perfect Brands for WooCommerce” plugin and added following code in child theme’s function.php file. But it still not displaying brand name in product loops. Please Help.
Website Link: https://www.giftrepository.com/product-category/new-arrivals/
Code added in function.php:
add_action( ‘woocommerce_before_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, ‘pwb-brand’ );
foreach( $brands as $brand ){
echo ‘term_id).'” class=”category uppercase is-smaller no-text-overflow product-cat op-7″>’;
echo $brand->name;
echo ‘‘;
}
}