I know similar questions have been asked dozens of times but I’m just not understanding how to display custom fields. I’m using woocommerce and want to display a custom field value on product pages.
I add the custom field “current_promotions” and a value to a product, and have tried adding this to the content-product.php template, but I’m getting nowhere:
<?php $postid = get_the_ID(); ?> <?php get_post_meta($post_id, $key, $single); ?>
This should do it
<?php echo get_post_meta( get_the_ID(), 'current_promotions', true ); ?>