Show images with Url from custom field

Estimated reading: 1 minute 1252 views

Time needed: 4 minutes

Sometimes you need to show an image from a custom field. Also may you need to set an URL to that image. In this tutorial, we are going to add custom fields for images and url and show them in our table. We need an 'Advanced Custom Fields(ACF)' plugin for this.

  1. Add a custom field for image

    We add a custom field for image using ACF. Make sure that the field type is 'Image'

  2. Add a custom field for the URL

    Now we need to add a field for the URL. Here your custom field name has to be 'image_url' , and the field type is 'Url'.

  3. Take a look

    If you did everything right, then you should have two custom fields, 'Image' and 'URL', in your product add page.

  4. Add a column in the table

    Now we need to add a new column to show that image.

  5. Result

    You can see the result in the table.

Share this Doc

Show images with Url from custom field

Or copy link

CONTENTS