Home / Forums / WoodMart support forum / add image under “wd-product-brands set-mb-s woodmart-product-brands”
Home › Forums › WoodMart support forum › add image under “wd-product-brands set-mb-s woodmart-product-brands”
add image under “wd-product-brands set-mb-s woodmart-product-brands”
- This topic has 6 replies, 2 voices, and was last updated 3 years, 10 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
August 23, 2022 at 6:14 pm #399100
loraloraParticipantHello
Please help me how to add “acf” image under “wd-product-brands set-mb-s woodmart-product-brands”
i don’t know php well, i tried this but it didn’t work.
your help?add_action( 'woocommerce_single_product_summary', 'display_image_logo_acf', 40 ); function display_image_logo_acf() { global $product; add_image_size( 'new-size', 254, 340, true ); $image = get_field('prod_logo'); $size = 'new-size'; // (thumbnail, medium, large, full) if( $image ) { echo class="wd-product-brands-links woodmart-product-brands-links" wp_get_attachment_image( $image, $size ); } }-
This topic was modified 3 years, 10 months ago by
loralora.
Attachments:
You must be logged in to view attached files.August 24, 2022 at 10:31 am #399239Hello,
Sorry but we could not help with Customizations.
This is beyond our limitations and support policy.
You can try modifying the single product layout using our layout builder:
https://xtemos.com/docs-topic/single-product-page-builder/Best Regards
August 24, 2022 at 7:31 pm #399384
loraloraParticipantI understood about the code.
Then I ask you for help with a hook to add my code to this particular field.
add_action( 'woocommerce_single_product_summary', 'display_image_logo_acf', 0 ); function display_image_logo_acf() { add_image_size( 'new-size_prod_logo', 120, 40, true ); $image = get_field('prod_logo'); $size = 'new-size_prod_logo'; // (thumbnail, medium, large, full) if( $image ) { echo wp_get_attachment_image( $image, $size ); } }On the picture:
In red: the element that I have added with the code (it works well).
Green Arrow: This is where I need to move the code.
Lettuce Branch: This is where I need to add the code.Please share the hook.
Attachments:
You must be logged in to view attached files.August 24, 2022 at 7:36 pm #399386
loraloraParticipantIf there is no hook, please provide a php file for redefinition, for a child theme
August 25, 2022 at 11:03 am #399480Hello,
You can find the file under “woodmart/woocommerce/content-single-product.php” and customize at your own risk.
Best Regards
-
This reply was modified 3 years, 10 months ago by
Aizaz Imtiaz Awan.
August 25, 2022 at 4:20 pm #399575
loraloraParticipantOKAY, WHICH LINES CAN I PUT THIS BETWEEN?
August 26, 2022 at 9:23 am #399707Hello,
Sorry but we could not help in Customizations. This is beyond our limitations and support policy.
Best Regards
-
This topic was modified 3 years, 10 months ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register