Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created December 1, 2021 11:57
Show Gist options
  • Select an option

  • Save ahmedeshaan/42080d5817f9095b28def8f31b853eb8 to your computer and use it in GitHub Desktop.

Select an option

Save ahmedeshaan/42080d5817f9095b28def8f31b853eb8 to your computer and use it in GitHub Desktop.
if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) {
/**
* Fix WooCommerce Loop Title
*/
function woocommerce_template_loop_product_title() {
echo '<h3 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 '</h3>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment