Title: .entry custom background image using custom fields
Last modified: August 19, 2016

---

# .entry custom background image using custom fields

 *  [Gr1f](https://wordpress.org/support/users/gr1f/)
 * (@gr1f)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/entry-custom-background-image-using-custom-fields/)
 * Hi folks. Looking for a way to apace a path to an image in a Custom Field that
   will become the background image to the div class .entry.
 * my PHP is extremely limited so any help appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Gr1f](https://wordpress.org/support/users/gr1f/)
 * (@gr1f)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/entry-custom-background-image-using-custom-fields/#post-1533962)
 * I was trying something like this in the loop:
 *     ```
       <div id="content" class="narrowcolumn">
       <?php query_posts('category_name=testimonial&showposts=100'); ?>
   
       		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       		<div class="post" id="post-<?php the_ID(); ?>">
   
               <div class="lead-image-wrapper">
       		<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
   
               <?php $image = get_post_meta($post->ID, 'lead_image', true); ?>
       <img src='<?php echo $image; ?>' />
   
       			<div class="entry">
       				<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
   
       				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
   
       	<small id="comments"><?php comments_number('No Comments yet', 'One Comment', '% Comments' );?> to “<?php the_title(); ?>” <br /><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">View Event / Comment on Event</a></small>
   
       			</div>
       		</div>
               </div class="lead-image-wrapper">
       ```
   
 * where I would specify a custom field “lead-image”
 *  Thread Starter [Gr1f](https://wordpress.org/support/users/gr1f/)
 * (@gr1f)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/entry-custom-background-image-using-custom-fields/#post-1533963)
 * OK, stupid me……
    I just say the problem:
 * template looks for lead_image
 * custom field specified lead-image
 * 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘.entry custom background image using custom fields’ is closed to new 
replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [Gr1f](https://wordpress.org/support/users/gr1f/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/entry-custom-background-image-using-custom-fields/#post-1533963)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
