diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 17884d8c8ff..6cd46dc3649 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -507,6 +507,14 @@ if ( ! function_exists( 'woocommerce_product_loop_end' ) ) { return ob_get_clean(); } } +if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) { + /** + * Show the product title in the product loop. By default this is an H3 + */ + function woocommerce_template_loop_product_title() { + wc_get_template( 'loop/title.php' ); + } +} if ( ! function_exists( 'woocommerce_taxonomy_archive_description' ) ) { /** diff --git a/includes/wc-template-hooks.php b/includes/wc-template-hooks.php index fb53395d3d9..9143fd4365e 100644 --- a/includes/wc-template-hooks.php +++ b/includes/wc-template-hooks.php @@ -88,6 +88,7 @@ add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ) */ add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); +add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 ); add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); diff --git a/templates/content-product.php b/templates/content-product.php index 879eca28bbc..0967a7e7817 100644 --- a/templates/content-product.php +++ b/templates/content-product.php @@ -58,7 +58,15 @@ if ( 0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns'] ) { do_action( 'woocommerce_before_shop_loop_item_title' ); ?> -
+ + +