Advanced Custom Fileds in single-product

Posted in: Newspaper
Post count: 12

i want to use Advanced Custom Fields in my single product page, where I have to put this code in the newspaper/woocommerce/single-product.php, This code is placed between woocommerce_before_main_content and woocommerce_after_main_content, but, i don’t now where is woocommerce_before_main_content and woocommerce_after_main_content

$fields = get_field_objects();
if( $fields )
{
foreach( $fields as $field_name => $field )
{
echo '<div>';
echo '<h3>' . $field['label'] . '</h3>';

if ( is_array( $field['value'] ) )
{
echo implode( ', ', $field['value'] );
}
else
{
echo $field['value'];
}

echo '</div>';
}
}

Post count: 22421

Hello,
Here is where the product content is called in our theme: http://screencast.com/t/jeeDmXSkSDM You can try altering this file or the woocommerce files directly.
Maybe you can find a solution here: https://support.advancedcustomfields.com/forums/topic/acf-with-woocommerce/
Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.