Last active
September 23, 2024 08:27
-
-
Save jmabbas/299e148623a2bbacf108adae0771752f to your computer and use it in GitHub Desktop.
WooCommerce - Tittle h3 change to other page except category page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function woocommerce_template_loop_product_title() { | |
if ( is_product_category() ) { | |
echo wp_kses_post( '<h3 class="woocommerce-loop-product__title">' . get_the_title() . '</h3>' ); //only load category page | |
} else { | |
echo wp_kses_post( '<div class="woocommerce-loop-product__title">' . get_the_title() . '</div>' ); //load all pages | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment