• Dear friends, I would like to change the h2 tag of the categories (in the home page) to h3.
    Thank you

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @cristiantm,

    The category title is coming from the WooCommerce. You could override the default?woocommerce_template_loop_category_title?function from within your theme like this by adding it to the?functions.php?file.

    remove_action( 'woocommerce_shop_loop_subcategory_title', 'woocommerce_template_loop_category_title', 10, 2 ); 
    add_action( 'woocommerce_shop_loop_subcategory_title', 'woocommerce_template_loop_category_title_over', 10 );
    function woocommerce_template_loop_category_title_over( $category ) {
    	?>
    	<h3 class="woocommerce-loop-category__title">
    			<?php
    			echo esc_html( $category->name );
    
    			if ( $category->count > 0 ) {
    			
    				echo apply_filters( 'woocommerce_subcategory_count_html', ' (' . esc_html( $category->count ) . ')', $category );
    			}
    			?>
    		</h3>
    	<?php
    }

    Alternate, you can add the above code snippet using?Code Snippet?plugin.

    I hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Change h2 categories from home to h3’ is closed to new replies.