Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

This Snippet provided by Ben stopped working -virtue update 4.4.1

Home / Forums / Virtue Theme / This Snippet provided by Ben stopped working -virtue update 4.4.1

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
January 25, 2018 at 8:39 am

/*change product title from h5 to h2 category pages*/

add_action('init', 'kt_custom_shop_title');
function kt_custom_shop_title() {
remove_action( 'woocommerce_shop_loop_item_title', 'kt_woocommerce_template_loop_product_title', 10 );
add_action( 'woocommerce_shop_loop_item_title', 'custom_kt_woocommerce_template_loop_product_title', 10);
function custom_kt_woocommerce_template_loop_product_title() {
echo '<h2>'.get_the_title().'</h2>';
}
}

the updated h2 title on category pages is added. But the h5 is not removed so end up with two titles…
any ideas ? cheers lee

  • The forum ‘Virtue Theme’ is closed to new topics and replies.