Nick Shaw

Woocommerce custom field under product title on product category page

Add Advanced Custom Field below the Woocommerce product title called ‘strapline’ on the product category page.
You can then style second-tile class to make it look different.

<?php 
//add cubtitle under product name
function nssecondtitle() { ?>
<div class="second-tile"><?php echo get_post_meta(get_the_ID(), "strapline", true); ?></div>
<?php }
add_action( 'woocommerce_after_shop_loop_item_title', 'nssecondtitle', 6 );
?>
Exit mobile version