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 180535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:36:12+00:00 2026-05-11T14:36:12+00:00

I need to add an image to each page in WordPress. I don’t wish

  • 0

I need to add an image to each page in WordPress. I don’t wish to insert it using the WYSIWYG editor, I just need the url as a custom field, which I later use in the template.

I tried using the CFI plugin (Custom Field Images), and I hacked my way into getting it to work with the rest of my plugins, but then I moved the site to the production server and CFI just didn’t work for some reason.

I can’t seem to find any other plugin that just lets you pick an image from the library and add it as a custom field.

I’ve downgraded to the point where I’m willing to manually enter all the URLs into each and every page. but before I do, I thought I’d check here.

Can anyone tell me what’s the easiest, best way to add images as custom fields in WordPress (2.7.1 if it matters)?

  • 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. 2026-05-11T14:36:13+00:00Added an answer on May 11, 2026 at 2:36 pm

    In our WordPress template, each post generally only has one image ‘attached’, which is displayed outside the posts’ (textual) content.

    I simply upload the file using the edit posts’ media uploader, never insert it into the post like JoshJordan above, then retrieve the image using a bit of code in the right place in my template file.

    This would also work if you’re using more than one image in your post, eg. in your post content. As long as you keep the image used as the ‘main’ post image as the first image (remember you can re-order images in your posts’ image library by dragging them up and down), you’re easily able to call it anywhere in your template file by using something like this:

    <?php $img_size = 'thumbnail'; // use thumbnail, medium, large, original  $img_id = $wpdb->get_var('SELECT ID FROM $wpdb->posts where post_parent= $post->ID and (post_mime_type = 'image/jpeg' OR post_mime_type = 'image/gif') and post_type = 'attachment'');  $img_array = wp_get_attachment_image_src($img_id,$img_size,false);  echo '<img src=''.$img_array[0].''' title=''.get_the_title().'' />'; ?> 

    No need for copying and pasting image urls.

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

Sidebar

Related Questions

I am using the Add-on builder and I need to receive binary data (image).
I need to add the following detail image to each div of a certain
I need to add an image/icon to the last column in the row. And
In One of my application i need to add some image in video. so
I need to know can we add image in TextArea through StyleableTextField htmlText because
I need allow registered front end users to add, remove images to image gallery.
I'm using a bit of jQuery to expand/hide some divs. I need to add
I need to show a Line Chart on an ASP.NET page where each data
I need add Auto complete on apex Tabular Form. there is a column as
I need add a new user group for mediawiki. The new group has more

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.