Display Brand Description Field - by andyblack19

This topic has 20 replies, 7 voices, and was last updated 8 years, 2 months ago ago by Jack Richardson

  • Avatar: andyblack19
    andyblack19
    Participant
    March 13, 2015 at 13:07

    I want to display the brand description on the brand taxonomy page.
    I notice the theme’s taxonomy-brand.php just calls to archive-product.php .

    I copied the contents of archive-product.php into a child theme file taxonomy-brand.php so I could change the brand page only without interfering with regular product archives.

    I tried these 2 calls, but could not get the Brand description to display. Can you help?
    do_action( ‘woocommerce_taxonomy_archive_description’ );
    do_action( ‘woocommerce_archive_description’ );

    19 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    March 13, 2015 at 15:27

    Hello,

    What theme version are you using?
    Is it the latest 2.6.2 version?

    Regards,
    Eva Kemp.

    Avatar: andyblack19
    andyblack19
    Participant
    March 13, 2015 at 15:30

    v2.6 currently.

    Avatar: Eva
    Eva Kemp
    Support staff
    March 13, 2015 at 16:02

    Hello,

    Please update the theme to the latest version as well as Woocommerce plugin.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: andyblack19
    andyblack19
    Participant
    March 14, 2015 at 23:10

    Right, I’ve updated to the latest Woocommerce version 2.3.6, updated to your latest theme version 2.6.2.

    The problem still exists. No brand description displayed on the brand page.
    Also, your latest theme version now has a bug that puts double brackets around all of the product filters. I had to comment out .widget_layered_nav ul li .count:before & after CONTENT in CSS.

    Why did you tell me to update my versions if you knew this would not solve the original problem???

    Please reply with the fix for this.

    Avatar: andyblack19
    andyblack19
    Participant
    March 14, 2015 at 23:17

    Also, this needs fixing in your ‘latest’ version..

    Your theme has bundled outdated copies of WooCommerce template files. If you notice an issue on your site, this could be the reason. Please contact your theme developer for further assistance. You can review the System Status report for full details or learn more about WooCommerce Template Structure here.

    Avatar: Eva
    Eva Kemp
    Support staff
    March 16, 2015 at 13:15

    Hello,

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

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: andyblack19
    andyblack19
    Participant
    March 16, 2015 at 17:08

    I’m not going to give out access to my WordPress admin panel and especially not ftp access to someone!! This is a live server and contains sensitive information.

    Surely you have your own test environment where you can replicate this?

    Why do you need this access?

    I did a fresh install of your latest theme.

    Entered data in the Description field for a Woocommerce Brand http://larosabella.co.uk/wp-admin/edit-tags.php?action=edit&taxonomy=brand&tag_ID=63&post_type=product

    This is then not displayed on the front end here http://larosabella.co.uk/brand/quinper

    Avatar: Eva
    Eva Kemp
    Support staff
    March 16, 2015 at 21:19

    Hello,

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

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

    Please try it.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: mattprice99
    mattprice99
    Participant
    March 23, 2015 at 21:55

    Hi Eva,

    I am also trying to achieve what the originator poster asked. Your code above refers to a product category description rather than the brand taxonomy description and does not work. Are you able to offer ay further pointers as I am going round in circles trying to solve this one.

    Many thanks
    Matt

    Avatar: andyblack19
    andyblack19
    Participant
    March 23, 2015 at 22:08

    Hi Matt,
    You’re right, the code suggested above didn’t work.
    I gave up on the ‘support’ here in the end.
    I ended up using a Tag for each brand, rather than the built in Brand Taxonomy, as the tag description does get displayed.
    So the URL looks like below.

    http://larosabella.co.uk/tag/quinper

    Avatar: mattprice99
    mattprice99
    Participant
    March 23, 2015 at 22:17

    Hi,

    If EightTheme are unable to help or I find a solution elsewhere I will post it here. Tagging the Brand is not ideal because we lose the ability to use the in-built brand widget and Brand element in Visual composer.

    Site looks great btw.

    Kind Regards
    Matt

    Avatar: mattprice99
    mattprice99
    Participant
    March 23, 2015 at 22:22

    Aha, bit of trial and error and I found it.

    Add the following to line 56 of woocommerce/archive-product.php

    <?php echo term_description( ”, get_query_var( ‘brand-taxonomy’ ) ); ?>

    Regards
    Matt

    Avatar: Robert Hall
    Robert Hall
    Support staff
    March 24, 2015 at 10:13

    Hello @andyblack19 and @mattprice99,

    So, is your issue solved now?

    Regards,
    Robert Hall.

    Avatar: mattprice99
    mattprice99
    Participant
    March 26, 2015 at 11:54

    Hi Robert,

    It is for me thanks. I believe the original poster found their own workaround but my code above should help others stumbling across this thread.

    Regards
    Matt

    Avatar: Robert Hall
    Robert Hall
    Support staff
    March 26, 2015 at 12:06

    Hello,

    Thank you for your help.
    If you have any questions please feel free to contact us.

    Regards,
    Robert Hall.

    Avatar: Vagelis
    Vagelis
    Participant
    February 5, 2016 at 15:35

    Hello

    I have added both codes in line 56 and and is not working for me.
    Using Version: 2.10.0 Legenda , Version: 4.4.2 WordPress , Version: 2.5.2 Woocommerce

    Thank you

    *Using a child theme but I have modified the actual file in Legenda theme

    Thank you

    Avatar: Eva
    Eva Kemp
    Support staff
    February 5, 2016 at 20:22

    Hello @Vagelis,

    Please clarify what you want to achieve and provide us with FTP/WP admin panel credentials in private content.

    Regards,
    Eva Kemp.

    Avatar: lew-egr
    lew-egr
    Participant
    September 25, 2016 at 12:26

    Old thread, but i had the same issue.

    To get it to work properly I had to change the code from mattprice99 above from:

    <?php echo term_description( ”, get_query_var( ‘brand-taxonomy’ ) ); ?>

    to:

    <?php echo term_description( "", get_query_var( 'brand-taxonomy' ) ); ?>

    adding this just below <?php etheme_category_header();?> in archive-product.php

    then hid/commented out line 40:

    <?php do_action( 'woocommerce_archive_description' ); ?>

    to avoid duplicate descriptions.

    Hope that is of help. Thanks Matt for your original fix.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 26, 2016 at 08:20

    Hello @lew-egr,

    Thank you for the provided solution. We appreciate it very much.
    Have a nice day.

    Best regards,
    Jack Richardson.

  • Viewing 20 results - 1 through 20 (of 20 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.