Display brand linked terms above product title in WooCommerce shop pages
I am trying to display the brand name above the product title on the shop page. The code works, but it removes the link from the product title so it no longer links to the single product page. I have no idea how this can be edited to work properly. add_action( 'woocommerce_before_shop_loop_item_title', 'show_brand_before_title', 10 ); function show_brand_before_title() { global $product; $terms = get_the_terms( $product->get_id(), 'product_brand' ); // Replace 'product_brand' with the slug of your brand taxonomy if ( $terms && ! is_wp_error( $terms ) ) { $brand_list = array(); foreach ( $terms
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.