Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Created August 22, 2019 12:59
Show Gist options
  • Select an option

  • Save thecodepoetry/40723eaac08fe5da20b046946bace569 to your computer and use it in GitHub Desktop.

Select an option

Save thecodepoetry/40723eaac08fe5da20b046946bace569 to your computer and use it in GitHub Desktop.
WC product loop title to h2
if ( ! function_exists( 'dt_woocommerce_template_loop_product_title' ) ) :
/**
* Show the product title in the product loop.
*/
function dt_woocommerce_template_loop_product_title() {
if ( presscore_config()->get( 'show_titles' ) && get_the_title() ) : ?>
<h2 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php echo the_title_attribute( 'echo=0' ); ?>" rel="bookmark"><?php
the_title();
?></a>
</h2>
<?php endif;
}
endif;
@thecodepoetry

Copy link
Copy Markdown
Author

Please try this code in your child theme functions.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment