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

change product title from h5 to h2 category pages

Home / Forums / Virtue Theme / change product title from h5 to h2 category pages

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme

Tagged: 

  • This topic has 6 replies, 2 voices, and was last updated 8 years ago by lee.
February 7, 2018 at 4:19 pm

//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>';
}
}

now produces the h2 AND the h5 varients, whereas before last update would only output the modified h2

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