Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created July 8, 2017 07:30
Show Gist options
  • Save ahmedeshaan/9072c4c9429f6463eb18cf0f774eb201 to your computer and use it in GitHub Desktop.
Save ahmedeshaan/9072c4c9429f6463eb18cf0f774eb201 to your computer and use it in GitHub Desktop.
function custom_flatsome_woocommerce_shop_loop_excerpt(){
if(!flatsome_option('short_description_in_grid')) return; ?>
<p class="box-excerpt is-small">
<?php /*echo get_the_excerpt();*/ ?>
<?php echo wp_trim_words( get_the_excerpt(), 10); ?>
</p>
<?php
}
add_action('flatsome_product_box_after', 'custom_flatsome_woocommerce_shop_loop_excerpt', 21);
add_action('init', function(){
remove_action('flatsome_product_box_after', 'flatsome_woocommerce_shop_loop_excerpt', 20);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment