• Resolved kezion

    (@kezion)


    I want to display the product brand in the Meta section. The standard WooCommerce attribute is used to display the brand. I managed to write the following code, which displays the brand as text, but the brand itself is not clickable. How to make it possible to click on a brand and go to the attribute (brand) page?

    <?php if(!empty($product->get_attribute('brand'))){ ?>
    	<div class="brand">
    	<b>Бренд:</b> <a href="<?php echo echo $_attribute->getProductAttribute()->getAttributeCode(); ?>"> <?php global $product;
    	echo $product->get_attribute('brand'); ?> </a> 
    	</div>
    <?php } ?>

    On the page element is displayed here https://yadi.sk/i/70lBQXO37_RN6A but dont have clickable link

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clickable url on Woocommerce product page’ is closed to new replies.