Hello, Corrado,
To proceed with this, please send us the FTP access details. We need to add custom code to the child theme and modify some files in the plugin.
Best Regards,
8Theme’s Team
Solved7 replies2 participantsUpdated by Andrew Mitchell
Hello Dear,
I need to display only the primary brand and exclude any subsidiary brands, both on individual product pages and within the brand logo slider.
It’s that possible?
Hello, Corrado,
To proceed with this, please send us the FTP access details. We need to add custom code to the child theme and modify some files in the plugin.
Best Regards,
8Theme’s Team
Thank you, i’ve added in private area content
We are pleased to inform you that we have introduced a new feature, the “Hide Child Brands” option, for the Brand Carousel Element. This feature will be made available in the upcoming theme update.
To remove child brands from the single product pages, we have added the following code to the functions.php file of the child theme.
function etheme_single_product_brands() {
if ( etheme_xstore_plugin_notice() ) {
return;
}
global $post;
$terms = wp_get_post_terms( $post->ID, 'brand' );
$brand = etheme_get_option( 'brand_title',1 );
$show_image = etheme_get_option('show_brand_image', 1);
if ( count( $terms ) < 1 ) {
return;
}
// Initialize an array to hold parent terms
$parent_terms = array();
// Filter out child terms
foreach ($terms as $term) {
if ($term->parent == 0) { // Check if the term is a parent
$parent_terms[] = $term; // Add to parent terms array
}
}
$_i = 0;
?>
<span class="product_brand">
<?php if ( $brand ) {
echo esc_html__( 'Brand: ', 'xstore' );
} ?>
<?php foreach ( $parent_terms as $brand ) : $_i ++; ?>
<?php
$thumbnail_id = absint( get_term_meta( $brand->term_id, 'thumbnail_id', true ) ); ?>
<a href="<?php echo get_term_link( $brand ); ?>">
<?php if ( $thumbnail_id && $show_image ) {
echo wp_get_attachment_image( $thumbnail_id, 'full' );
} else { ?>
<?php echo esc_html( $brand->name ); ?>
<?php } ?>
</a>
<?php if ( count( $parent_terms ) > $_i ) {
echo ", ";
} ?>
<?php endforeach; ?>
</span>
<?php
}
Should you require any further assistance, please do not hesitate to contact us.
Best Regards,
The 8Theme Team
Super thanks.
So when a new update will be available, i need to remove this code in my function and enable the new feature directly on theme options?
Thanks.
We are pleased to inform you that the updated version has been successfully transferred to you. There is no action required on your part. Additionally, please be assured that there is no need to remove the code from the child theme, as it is responsible for the modifications made to the brand for the single product.
Best Regards,
The 8Theme Team
Oh perfect, thank you!
Dear Corrado Zanetti,
Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?
Click here to share your insights: https://themeforest.net/downloads
Your support fuels our journey, and we appreciate it more than words can express.
Best Regards,
The 8Theme Team
The issue related to '‘Show only main brand and no sub-brand in website’' has been successfully resolved, and the topic is now closed for further responses
Free AI store scan · SalesMax
Paste your store address. SalesMax AI shows which upsell moments are missing. No signup.
Free AI speed test · FlashMax
Paste your site address. FlashMax runs Google Lighthouse for phone and desktop, checks Core Web Vitals and lists what to fix. No signup.
Handmade artisansHandmade & Crafts
(live demo, opens in a new tab)
Medical 02Business
(live demo, opens in a new tab)
LawyerBusiness
(live demo, opens in a new tab)
SunglassesFashion
(live demo, opens in a new tab)
Purely HandmadeHandmade & Crafts
(live demo, opens in a new tab)
SpaBeauty
(live demo, opens in a new tab)
TransportCars & bikes
(live demo, opens in a new tab)
Makeup StoreBeauty
(live demo, opens in a new tab)
BookStoreBooks & art
(live demo, opens in a new tab)
Painting studioBooks & art
(live demo, opens in a new tab)
Niche Market 03Marketplace
(live demo, opens in a new tab)
Furniture Store 02Furniture
(live demo, opens in a new tab)
Real EstateReal Estate
(live demo, opens in a new tab)
BarbershopBeauty
(live demo, opens in a new tab)
Furniture StoreFurniture
(live demo, opens in a new tab)
Pizza StoreFood & drinks
(live demo, opens in a new tab)