0
X
Add Snippet To Project
New Project
Add To Existing Project
<?php
// Display the additional product image upload field
echo '<div class="options_group">';
echo '<p class="form-field">';
echo '<label for="product_image">' . __('Product Image', 'wpturbo') . '</label>';
echo '<input type="file" name="product_image" id="product_image" />';
echo '</p>';
echo '</div>';
?>
Make sure to place this code where you want the field to appear in relation to the existing product information.
After adding this code, the additional image upload field will be visible to customers on the product page, allowing them to upload an image for the product.
Keep in mind that modifying theme files directly may cause issues during theme updates. It's recommended to create a child theme and place the modified 'single-product.php' file there to avoid losing your changes in future updates.
