This topic has 6 replies, 3 voices, and was last updated 2 years, 7 months ago ago by Olga Barlow
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
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
Dear rose,
thanks for your swift reply, will put everything on the private area
thanks again for your kind support,
Best regards,
Flavio
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
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
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
Tagged: excerpt, missing, persuasive, short description, solution, woocommerce, wordpress
You must be logged in to reply to this topic.Log in/Sign up