Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8249723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:38:29+00:00 2026-06-07T23:38:29+00:00

I am using a custom field to upload an image to my post. I

  • 0

I am using a custom field to upload an image to my post. I now want to display this image on the post by editing the template but struggling to find out how.

My custom field is called ‘image’ but all I can seem to do is display the URL of the image when I echo it.

Is there a simple way / line of code to display this image on the post?

Thanks

I used this code to get the image

<?php echo get_post_meta($post->ID, 'image', true) ?>

obviously it is not the best and only gets the field value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:38:33+00:00Added an answer on June 7, 2026 at 11:38 pm

    If you’re just displaying it via html you can simple do this if <?php echo get_post_meta($post->ID, 'image', true) ?> returns a URL for the image.

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

    this will use the URL you have returned to get the image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a wordpress custom post type. I am using custom field template
I've made a field using Custom Formatters (Drupal, CCK). Now I got this PHP
I'm using this codes for listing custom field values into drop-down list element on
I'm making a custom page template in wordpress and adding an image by using
If I display a string in a custom field using drawtext(txt,ax,ay) method, how can
I am using Wordpress Custom Field Template Plugin - http://wordpress.org/extend/plugins/custom-field-template/ I create some File
I know I can send a custom field using IPN with $_POST['custom'] But can
I am using wordpress custom fields to dynamically display a imdb link to an
I'm aware of using custom configuration values for my custom services, but what if
i am using custom checkbox buttons in my table view and want to save

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.