Show more / toggle in brand description - by lew-egr

This topic has 7 replies, 3 voices, and was last updated 7 years, 10 months ago ago by Jack Richardson

  • Avatar: lew-egr
    lew-egr
    Participant
    January 26, 2017 at 15:38

    As the native Legenda toggle shortcode is broken, i’m using one called WP Show More to hide part of more lengthy cat/brand descriptions.

    It works great on all static pages and product category pages, but for some reason it refuses to work on brand pages.

    I have added in brand description to /woocommerce/archive-product.php to get the brand description showing on category pages.

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

    The brand desctiption text appears fine, but using a shortcode like [show_more more=”More” less=”Less”] doesn’t work, it just shows up as plain text on the front end. This isn’t the only plugin that i’ve tried and had this outcome, so it’s not a plugin issue.

    As both brand and product category pages use the archive-product.php as a base, any ideas as to why shortcodes work on one and not the other?

    Please, contact administrator
    for this information.
    6 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    January 26, 2017 at 16:52

    Hello,

    Could you please provide FTP credentials to check this issue?

    Regards,
    Eva Kemp.

    Avatar: lew-egr
    lew-egr
    Participant
    January 26, 2017 at 18:14

    Hi details below

    Please, contact administrator
    for this information.
    Avatar: lew-egr
    lew-egr
    Participant
    January 27, 2017 at 14:28

    Hi, i don’t like to push, but the site went live today. Do you think you’ll manage to look before the weekend?

    Thanks

    Avatar: Eva
    Eva Kemp
    Support staff
    January 27, 2017 at 16:51

    Hello,

    I’ve added this code in functions.php file:
    add_filter( 'term_description', 'do_shortcode' );

    Please check the page now.

    Regards,
    Eva Kemp.

    Avatar: lew-egr
    lew-egr
    Participant
    January 28, 2017 at 01:14

    That’s it, works a treat. Thank you!

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    January 28, 2017 at 10:19

    Hello,

    You’re welcome.

    Best regards,
    Jack Richardson.

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

The issue related to '‘Show more / toggle in brand description’' has been successfully resolved, and the topic is now closed for further responses

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