Last active
March 5, 2022 07:24
-
-
Save mitchellkrogza/46144d47944d4616dbef0923416b3f21 to your computer and use it in GitHub Desktop.
Flatsome Theme Change Shop & Category Loop Product Title from <p> to <h2>
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
/** | |
* Flatsome Theme | |
* Change Shop & Catalog Product Titles from <p> to <h2> | |
* Adjust to <h3> <h4> <h5> <h6> as you require. | |
*/ | |
if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) { | |
function woocommerce_template_loop_product_title() { | |
echo '<h2 class="name product-title ' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '">'; | |
woocommerce_template_loop_product_link_open(); | |
echo get_the_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
woocommerce_template_loop_product_link_close(); | |
echo '</h2>'; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment