• Resolved olegl

    (@olarionov)


    Hi

    It is excellent thread. I have add the code below to functions.php and it does place Brand name between picture box and product tile in category/catalog view.

    The issue is that the Brand name font / color /stile is the same as product title and it has link to Brands page, so it is very easy for a user to click the brand link to jump away on to brands page.
    1. How can I change the font stile / color for a brand in category view?
    2. Can I remove the actual link from the brand name in the category view so the brand become just a text label?

    The Code I used:

    /*** Brands in Catalog**/
    function pwb_show_brands_in_loop(){
    global $product;
    $product_id = $product->id;
    $product_brands = wp_get_post_terms($product_id, ‘pwb-brand’);
    if(!empty($product_brands)){
    echo ‘<div class=”custom-loop-brands”>’;
    foreach ($product_brands as $brand) {
    echo ‘term_id).'”>’.$brand->name.’‘;
    }
    echo ‘</div>’;
    }
    }
    add_action(‘woocommerce_before_shop_loop_item_title’, ‘pwb_show_brands_in_loop’,1);

  • The topic ‘Brand Name in Category View’ is closed to new replies.