Created
September 7, 2019 08:12
-
-
Save inakicalvo/96b48a5ed5eef4365a2d44446e1b7d77 to your computer and use it in GitHub Desktop.
Add product subtitle in Woocommerce product archives
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 archives | |
add_action( 'woocommerce_after_shop_loop_item_title', 'add_product_subtitle_in_archive', 40 ); | |
function add_product_subtitle_in_archive() { | |
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