This topic has 9 replies, 3 voices, and was last updated 7 years, 10 months ago ago by Jack Richardson
Hi,
What is the best way to go and implement a Banner in the Brand type, same as you have for the Category? I want it to be showing before the products.
I am willing to edit the code of the theme, but I need some guidelines where to start.
Example Category: Link
Example Brand (without the banner): Link
All the best,
Bojan
Hello,
In order to display a thumbnail on a brand page you need add this code in wp-content/themes/legenda/woocommerce/archive-product.php after the line (line 38):
`get_queried_object();
$image = ”;
if(empty($cat->term_id) && !is_search()){
$image = etheme_get_option(‘product_bage_banner’);
}else{
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, ‘thumbnail_id’, true );
$image = wp_get_attachment_url( $thumbnail_id );
}
if($image && $image !=”){
?>
Thank you for the quick reply. I have few more questions before I implement this.
How will I manage which image shows in the header for a specific Brand? Will I have the same interface as for Category?
Also the code that you pasted is not displayed properly. The last part of the code is shown as broken img.
Please use the CODE tag.
Hello,
I used the CODE tag, but still it’s not working.
Please provide us with wp-admin panel and FTP credentials in Private Content.
Regards,
Eva Kemp.
Please insert comment /* 8theme */ around the code so I can find it.
This is a staging server and I will need to replace code on live later.
Thank you
Hello,
I’ve added the file in your child theme directory wp-content/themes/legenda-child/woocommerce/archive-product.php and added the code in line 60.
Now thumbnails that you added for your brands are displayed on brand pages.
Please check, for example the brand “Boss”.
Regards,
Eva Kemp.
Thank you Eva. However, this displays the Brand thumbnail for Header Banner.
I would like to accomplish the exact thing that is implemented in the Category.
To be able to choose Header Image and display it before product list for a brand.
In my situation, the brand thumbnails and the header images are completely different.
Is this possible?
Hello,
Please take our apologies but unfortunately there is no such possibility.
Best regards,
Jack Richardson.
You must be logged in to reply to this topic.Log in/Sign up