Posts

Showing posts from January 20, 2019

Get product custom fields ACF in post page wordpress

Image
0 I am trying to get a product custom field ( ACF ) based on product ID in a post page. I tried things like this $price = get_sub_field('price', $productId); but it doesn't seems to work when taking something else than the post id . I managed to get the title though by doing like this <?php echo $product->get_title(); ?> but not sure on how to go to get the custom fields. php wordpress advanced-custom-fields share | improve this question asked Nov 13 '18 at 9:47 Rémi Rémi 12 5