How to show the brand description above products on a brand page

Solved9 replies3 participantsUpdated by Eva Kemp

  • Avatar: mc9625
    mc9625
    Participant

    Hi,

    I would like to create a better Brand Page. Basically I would like to have a brand page that will show some HTML (from brand description?) before the product list. Actually I can’t figure where the code responsible for the brand page is. Could you point me to the right direction?

    Thanks

    9 Answers

    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    Brands page uses the same template as products categories pages – wp-content/themes/royal/woocommerce/archive-product.php.
    Please note if you modify it product categories pages will also have the same template.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: martijntje
    martijntje
    Participant

    Hi,

    Is there a shortcode to add in archive-product.php? So that the brand description shows on the page?

    Avatar: Eva
    Eva Kemp
    Participant

    Hello @martijntje,

    To display description you need add this code in the file wp-content/themes/legenda/woocommerce/archive-product.php (after line 38):

    <? if(isset($cat->description) && $cat->description !='' && !is_shop()) {
    	            ?>
    	            	<div class="product-category-description">
    		            	<?php echo do_shortcode($cat->description); ?>
    	            	</div>
    	            <?php
                }
                
                
             ?>

    Regards,
    Eva Kemp.

    Avatar: martijntje
    martijntje
    Participant

    Hello Eva,

    I added the code to the file but still no effect; am I doing something wrong?

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    Please provide us with FTP and wp-admin panel credentials in Private Content.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: martijntje
    martijntje
    Participant

    🙂

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Participant

    Hello,

    Sorry for a delay.
    There is some issue with customization.
    We’ll fix it in the next update.

    Please take our apologies for inconveniences.

    Regards,
    Eva Kemp.

    Avatar: mc9625
    mc9625
    Participant

    Hi,

    I’ve used the code you suggest in Royal theme, and it works. But It doesn’t work for Brands, only categories description is displayed (I guess it’s due to the shortcode ($cat->description) that probably works only for categories).

    So, is there any shortcodes that retrieves both category and brand description?

    Or, could it be possible (for the royal theme) have a “Custom header” for brands, like the one we have in categories?

    Avatar: Eva
    Eva Kemp
    Participant

    Hello @mc9625,

    This request was forwarded to the developers and the issue will be fixed in the next theme release.
    We’re sorry for inconveniences.

    Regards,
    Eva Kemp.

The issue related to '‘How to show the brand description above products on a brand page’' has been successfully resolved, and the topic is now closed for further responses