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

This topic is: resolved
Resolved
Posted in: Virtue Theme  

Tagged: 

  • February 7, 2018 at 4:19 pm #178298
    //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

    Sorry, this forum is for Premium customers only. Please Login to continue

    If you are using a free theme you can access support on wordpress.org by searching for the free theme and using the support tab.