Reputation: 3
I want to add a banner image on my single product page woo-commerce. I want to use Advanced Custom Field plugin for this, so user can change the banner on each product. I want this banner after the product description.
Upvotes: 0
Views: 4107
Reputation: 1177
You can use 'woocommerce_single_product_summary' filter.You need to create a function in "function.php' You can try this:
add_filter( 'woocommerce_single_product_summary', 'banner_image',28 );
function banner_image()
{
if(get_field('product_banner'))
{
echo '<img src="'.get_field("product_banner").'" alt="banner product" />';
}
}
Upvotes: 1