Last active
October 26, 2021 04:43
-
-
Save webtoffee-git/1a2283844f850dff1129912d811ea9ce to your computer and use it in GitHub Desktop.
Change the H2 tag on the related products heading to div tag - Related Products for WooCommerce (https://wordpress.org/plugins/wt-woocommerce-related-products/)
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
<?php // do not copy this line | |
add_filter('wt_related_products_heading', 'wt_crp_alter_title_tag'); | |
function wt_crp_alter_title_tag($title) { | |
$title = preg_replace("/<h2>(.+?)<\/h2>/is", "<div>$1</div>", $title); | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment