Site logo

Archived topic

loop categories woo

5 replies · Started by Ignacio on December 12, 2018

Viewing posts 1–6 of 6

You know some snippet that can be used to change the name of the product from h2 to h3 in the loop of the categories of woocommerce.

Regards

Hi there,

I'm not sure if that's possible without overwriting their template files in your child theme.

It may be worth checking with WooCommerce support to see if there's an easier way.

Hi Tom,

WooCommerce only gives support if you have any premium plugin purchased. For a doubt like this, they suggest contacting a Codeable developer.
I'm going to look for what modification at the template level should be made.

Regards

Try adding this function to your site:

if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
	/**
	 * Show the product title in the product loop. By default this is an H2.
	 */
	function woocommerce_template_loop_product_title() {
		echo '<h3 class="woocommerce-loop-product__title">' . get_the_title() . '</h3>';
	}
}

Hi Tom
the code works!
Thank you

You're welcome :)

This archived topic is closed to new replies.