• Resolved kpmarz

    (@kpmarz)


    I need to create a product page that displays a number of pictures. I am trying to create custom fields that display an uploaded photo. Is there a way to do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • etoilewebdesign

    (@etoilewebdesign)

    Hi kp,

    While there is a file type custom field, it can’t be used for displaying images on the product page. If you just want to display additional images on your product page, your best bet would be to use the “Add Product Images” section on the edit product screen.

    Thread Starter kpmarz

    (@kpmarz)

    Is this a feature you will be adding in the near future? The images are used to display product information (such as the nutritional label, allergy buttons, etc) so adding additional product images doesn’t quite work. Especially since they come through as small thumbnails.

    I know you can’t provide a personalized solution, but could you offer some guidance on a work around. This is a key feature to building our product pages and if adding the informational images isn’t an option I will have to look for a new plugin.

    etoilewebdesign

    (@etoilewebdesign)

    Hi Kp,

    It’s a good idea, so I’ll definitely bring it up to our development team.

    Here’s a temporary workaround you can use:

    1) Upload your images to the Media section in WordPress.

    2) Find your image’s URL (you can find this info by clicking an image and copying what’s in the “URL” field on the right).

    3) If you haven’t already, create a Custom Field. Give it a name (for example: “Allergy Warning”) and set the Type to “Short Text”. After you’re done, click “Add New Field” at the bottom.

    4) Edit a product and scroll down to your “Allergy Warning” custom field section. Paste in the following HTML code, but replace the “https://….peanut.jpg” text with the URL of your image:

    
    <img src="https://www.mywebsite.com/wp-content/uploads/2016/09/peanut.jpg" style="height:20px; width: auto;"/>
    

    Note: I’ve also added in some inline styling to the above code so the image will appear as a small icon with a height of 20 pixels. To adjust the size of your image, just change the number ’20’ to whatever you prefer ??

    • This reply was modified 8 years ago by etoilewebdesign. Reason: needed to bold url example
    Thread Starter kpmarz

    (@kpmarz)

    PERFECT! I didn’t even think of putting html in the “Short Text” field.

    Honestly, just a note that the text fields process code would be helpful. But for those less tech savvy, I can understand having an image upload option.

    Thanks for the help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use photos in Custom Fields’ is closed to new replies.