WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed WordPress and I'm trying to set a image to every post I have.

I did this:

Custom fields ----name: paddimage-gallery --value: URL of image.

I go to my home page and it does not appear.

Example of a page were it does work: MAIMPOK THEME

share|improve this question

You are almost there you just need to call it inside your theme file say in your index.php inside the loop somewhere between

<?php while ( have_posts() ) : the_post(); ?>
<?php endwhile; // End the loop. ?>

you need to add a call for that image using get_post_meta() like this:

<?php while ( have_posts() ) : the_post(); ?>
   $img_src = get_post_meta($post->ID, 'paddimage-gallery', true);
   if (isset($img_src){
     echo '<img src=' . $img_src . '>';
<?php endwhile; // End the loop. ?>

Hope this Helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.