Created
September 7, 2019 08:16
-
-
Save inakicalvo/72d4f12253a5cd0aa4c0c06956e92392 to your computer and use it in GitHub Desktop.
Add product subtitle in Woocommerce product pages
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
// Add product subtitle in product pages | |
add_action( 'woocommerce_before_single_product_summary', 'add_product_subtitle_in_product_page', 40 ); | |
function add_product_subtitle_in_product_page() { | |
if (function_exists('the_field')){ | |
if (get_field('subtitulo')){ | |
echo '<span class="product-subtitle">', the_field('subtitulo'), '</span>'; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment