• Resolved golden_zenith

    (@golden_zenith)


    I made a custom post type with corresponding custom fields, one of which has the name ‘image’. When I try to use <?php the_field(‘image’); ?> in the WP Loop, I do not see the image on my site, but merely their URLs, even though I followed the same exact process for another page with different custom fields (also images) and that worked.

    So now all I see is this: https://localhost/website/wp-content/uploads/2014/07/photo1.jpeg.

    What can I do to fix this?

Viewing 1 replies (of 1 total)
  • Thread Starter golden_zenith

    (@golden_zenith)

    Never mind – it was just a syntax error. For future reference, if you chosen image URL when creating a custom field and want to display the image, use this syntax:

    <img src='<?php the_field(‘image’); ?>’ />

Viewing 1 replies (of 1 total)
  • The topic ‘Image url showing up instead of image’ is closed to new replies.