Forums

[Plugin: Verve Meta Boxes] How to display image into the post template? (3 posts)

  1. trumpet1981
    Member
    Posted 1 year ago #

    Hi,

    I have created an image field called image01. I tried to display the image in my post and i include the following line to the post template.

    <?php echo get_post_meta_image($post->ID, "image01", true); ?>

    However, the display is the URL of the image. How can I display image?

    Thanks!

  2. valerama
    Member
    Posted 1 year ago #

    How you call a meta field depends partly on your theme. Please provide more info.

  3. joetheboss
    Member
    Posted 1 year ago #

    The correct syntax is:

    <img src="<?php echo get_post_meta($post->ID, 'image01', true); ?>" />

Topic Closed

This topic has been closed to new replies.

About this Topic