'Add dimensions under product title product overview Woocommerce [duplicate]

For the website that i'am building i try to get the dimensions of the product directly under the product title on the overview.

Here i want the dimensions

in ACF i made a field called 'productkaart_afmetingen' were i can fill in the dimensions data at every product. But i can't manage to load it in under the product title.

i tried adding

the_field('productkaart_afmetingen');

to the content-product.php in my child theme folder but this made the dimensions appear above the title and i can't manage to get is under the title



Solution 1:[1]

Code goes in functions.php

add_action( 'woocommerce_product_thumbnails', 'display_acf_field_under_images', 30 );
  
function display_acf_field_under_images() {
  echo '<b>ACF Field:</b> ' . get_field('productkaart_afmetingen');
  // Note: 'productkaart_afmetingen' is the slug of the ACF

}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 P.Sav