Advertisement
majeedraza

WooCommerce - Insert product description after shop loop tit

Jul 17th, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. <?php
  2.   // WooCommerce - Insert product description after shop loop title
  3.   add_action( 'woocommerce_after_shop_loop_item_title', 'insert_description', 20 );
  4.   function insert_description() {
  5.     global $product;
  6.     print substr( $product->get_description(), 0, 100 );
  7.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement