This topic has 8 replies, 2 voices, and was last updated 6 years, 4 months ago ago by Olga Barlow
Hello,
How do I display products brand name and also hide it for some specific brand.
I want to put it on top of the product title. I found the php file which is content-product.php . But no idea what code to write to display it.
Hello,
To display brand on grid copy royal/woocommerce/content-product.php file into child theme and edit. Add the following code <?php et_product_brand_image(); ?>
before the title http://prntscr.com/kd9yuf
Regards
This code includes the widget div. (It prints the widget title and also the brand name got link to its respective page)
What if I just want to echo the brand name without any href link and all?
Hello,
Open royal/framework/woo.php, find function et_product_brand_image copy it into child theme functions.php and edit it according to your needs.
Regards
Thank you.
btw off topic, let’s say there is call for homepage like is_homepage() / is_single() , how about for brand page? How can I call it?
Hello,
You can try
if ( is_tax( 'brand', '') ) {
echo 'is_brand';
}
What exactly do you want to implement?
Regards
Thank you thank you. It works. I used it too limit product title length to certain characters.
Before this only worked for homepage & standard woocommerce taxanomy pages.
One last thing, now only the related product slider not affect. Know how to call it?
This is example of how I used it
else if ( (is_home() || is_front_page() || is_tax( 'brand', '')) && get_post_type( $id ) === 'product' )
Hello,
If you want to change the products title length for the sliders copy and edit royal/woocommerce/content-product-slider.php
Regards
You must be logged in to reply to this topic.Log in/Sign up