If you want to change the product title markup on the shop/catalog pages to use a h2 or h3 you can do so with a custom function. Add the following code to either the functions.php file of a child theme or via the Code Snippets plugin.
add_action( 'after_setup_theme', 'cg_remove_shop_loop_item_title', 99 );
function cg_remove_shop_loop_item_title() {
remove_action( 'woocommerce_shop_loop_item_title', 'shoptimizer_loop_product_title', 10);
}
add_action( 'woocommerce_shop_loop_item_title', 'shoptimizer_loop_product_title_revised', 10);
function shoptimizer_loop_product_title_revised() {
global $post;
$shoptimizer_layout_woocommerce_display_category = '';
$shoptimizer_layout_woocommerce_display_category = shoptimizer_get_option( 'shoptimizer_layout_woocommerce_display_category' );
?>
<?php if ( true === $shoptimizer_layout_woocommerce_display_category ) { ?>
<?php echo '<p class="product__categories">' . wc_get_product_category_list( get_the_id(), ', ', '', '' ) . '</p>'; ?>
<?php } ?>
<?php
echo '<h2 class="woocommerce-loop-product__title"><a href="' . get_the_permalink() . '" aria-label="' . get_the_title() . '" class="woocommerce-LoopProduct-link woocommerce-loop-product__link">' . get_the_title() . '</a></h2>';
}In this example we’re using a h2, but you can obviously adjust the code to use a h3 instead if you wish.
