Excerpt problem – When Short description missing

This topic has 6 replies, 3 voices, and was last updated 2 years, 7 months ago ago by Olga Barlow

  • Avatar: Flavio Lucidi
    Flavio Lucidi
    Participant
    April 21, 2022 at 14:01

    Hello team,

    I have this problem with the excerpt, when the short description is empty, it will automatically add the text from the full description, but actually I need it to keep it empty when the short description is empty!

    I’ve opened a ticket with your support team and they confirmed that should not fill it with the full description when the short is empty, then they suggest to open a topic here

    Can someone help me with this?

    thanks in advance

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 21, 2022 at 14:14

    Hello,

    Thanks for using our theme.
    Please provide FTP access, URls of products with and without short description. If you do not know how to create FTP contact with your hosting provider, they will help you.

    Regards

    Avatar: Flavio Lucidi
    Flavio Lucidi
    Participant
    April 21, 2022 at 14:38

    Dear rose,

    thanks for your swift reply, will put everything on the private area

    thanks again for your kind support,

    Best regards,

    Flavio

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 22, 2022 at 06:54

    Hello,

    Please, check now !
    Result – https://prnt.sc/xcabTxSXUtEj
    We have added next custom in your child-theme/functions.php (https://prnt.sc/j3HHT2MTUCUm)
    Code snippet:

    
    function etheme_custom_make_excerpt_unfiltered($excerpt, $post) {
    return $post->post_excerpt;
    }
    add_filter('woocommerce_product_loop_start', function($ob_get_clean) {
    add_filter('get_the_excerpt', 'etheme_custom_make_excerpt_unfiltered', 999, 2);
    return $ob_get_clean;
    });
    
    add_filter('woocommerce_product_loop_end', function($ob_get_clean) {
    remove_filter('get_the_excerpt', 'etheme_custom_make_excerpt_unfiltered', 999, 2);
    return $ob_get_clean;
    });
    

    Seems like some plugin or somewhere else exists filter that makes full description output instead of empty excerpt so that we overwrite with our custom filters for you to prevent such things (on product loop start ‘woocommerce_product_loop_start’ we added our changes and removing them after end product loop ‘woocommerce_product_loop_end’)

    Regards

    Avatar: Flavio Lucidi
    Flavio Lucidi
    Participant
    April 22, 2022 at 09:23

    Dear Rose,

    thanks a million, works perfectly!

    Once again, I’m more than happy to have opted for Xtheme

    amazing product, even better support

    Best regards,

    Flavio

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    April 22, 2022 at 14:23

    Hello,

    Oh, thank you very much for your warm thoughts!
    We would be grateful for your review if you like our theme https://themeforest.net/item/xstore-responsive-woocommerce-theme/15780546

    Regards

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

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

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.