Hi,
Please let me know if the plugin ‘Woocommerce Brands’ can add a brand name link in the shop and category page just under product title.
Kind regards Pier Serta
0
Open
Last updated: February 13, 2023
Log in to comment on this feature request.
there is this code but it’s not a link. WC is reluctant to improve their code which I think is a must have.
https://woocommerce.com/document/woocommerce-brands/
<?php if ( is_plugin_active( 'woocommerce-brands/woocommerce-brands.php' ) ) { add_action( 'woocommerce_shop_loop_item_title', 'add_brands_to_product_loop' ); // Add brands to product loop. function add_brands_to_product_loop() { $terms = get_the_terms( get_the_ID(), 'product_brand' ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { $term = join( ', ', wp_list_pluck( $terms, 'name' ) ); echo esc_html( $term ); } } }
there is this code but it’s not a link. WC is reluctant to improve their code which I think is a must have.
https://woocommerce.com/document/woocommerce-brands/
<?php
if ( is_plugin_active( 'woocommerce-brands/woocommerce-brands.php' ) ) {
add_action( 'woocommerce_shop_loop_item_title', 'add_brands_to_product_loop' );
// Add brands to product loop.
function add_brands_to_product_loop() {
$terms = get_the_terms( get_the_ID(), 'product_brand' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$term = join( ', ', wp_list_pluck( $terms, 'name' ) );
echo esc_html( $term );
}
}
}