WooCommerce Excerpt Alot-plugin
Versie door Jeroen Strompf (overleg | bijdragen) op 20 okt 2017 om 15:30
Simple. See this source code for details:
<?php /** * Plugin Name: WooCommerce Product Teaser * Plugin URI: http://wiki.devliegendebrigade.nl/WooCommerce_Product_Teaser_(plugin) * Description: Add teasers to products on the WooCommerce product page * Version: 0.1 * Author: Jeroen Strompf - http://devliegendebrigade.nl/ * */ // woocommerce_product_teaser_display_excerpt() /////////////////////////////////////////////// // // Just a function with an arbitrary name // It does one thing: Call function the_excerpt(), which // outputs the excerpt/teaser/stuff before the read-more-tag of the current object // function woocommerce_product_teaser_display_excerpt() { the_excerpt(); } // hook /////////////////////////////////////////////// // // Add an action on hook 'woocommerce_after_shop_loop_item_title', // Namely: The call the function above. // add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_product_teaser_display_excerpt', 40 );