[Resolved] loop categories woo

Home Forums Support [Resolved] loop categories woo

Home Forums Support loop categories woo

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #754866
    chete

    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

    #755051
    Tom
    Lead Developer
    Lead Developer

    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.

    #756239
    chete

    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

    #756788
    Tom
    Lead Developer
    Lead Developer

    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>';
    	}
    }
    #756950
    chete

    Hi Tom
    the code works!
    Thank you

    #757052
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.