Skip to content

Instantly share code, notes, and snippets.

@inakicalvo
Created September 7, 2019 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inakicalvo/72d4f12253a5cd0aa4c0c06956e92392 to your computer and use it in GitHub Desktop.
Save inakicalvo/72d4f12253a5cd0aa4c0c06956e92392 to your computer and use it in GitHub Desktop.
Add product subtitle in Woocommerce product pages
// 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