Title: Custom meta data
Last modified: August 21, 2016

---

# Custom meta data

 *  Resolved [adejones](https://wordpress.org/support/users/adejones/)
 * (@adejones)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/)
 * I have a post with 4 custom fields, and I am using the_meta() to display these.
   
   I want to add an image to the list items, but a different image for each item
   eg. key “Client” will have a small image of a person, key “Date” will have an
   image of a calendar…
 * How is this possible please?

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

 *  [raajen](https://wordpress.org/support/users/raajen/)
 * (@raajen)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894628)
 * can you give the link to your demo so that it will be more clear to help you 
   sort out your problem
 *  Thread Starter [adejones](https://wordpress.org/support/users/adejones/)
 * (@adejones)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894629)
 * [http://theadminguy.co.uk/dev1/2013/06/our-work-1/](http://theadminguy.co.uk/dev1/2013/06/our-work-1/)
 *  Thread Starter [adejones](https://wordpress.org/support/users/adejones/)
 * (@adejones)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894633)
 * Have sorted it using this method:
    `<li><span class="client">Client: </span> 
   <?php echo esc_html(get_post_meta($post->ID, 'Client', true)); ?></li>`
 *  [raajen](https://wordpress.org/support/users/raajen/)
 * (@raajen)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894635)
 * Then mark it as resolved 😉
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894636)
 * Are you adding this list to your pages manually?
 *  Thread Starter [adejones](https://wordpress.org/support/users/adejones/)
 * (@adejones)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894637)
 * esmi – it is just in single.php
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894638)
 * So it is coded in single.php., yes? If so, can we see just that code snippet?
 *  Thread Starter [adejones](https://wordpress.org/support/users/adejones/)
 * (@adejones)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894639)
 * Yes.
 *     ```
       <ul class="post-meta">
       <li><span class="client">Client: </span> <?php echo esc_html(get_post_meta($post->ID, 'Client', true)); ?></li>
       <li><span class="date">Date: </span> <?php echo esc_html(get_post_meta($post->ID, 'Date', true)); ?></li>
       <li><span class="website">Website: </span> <?php echo esc_html(get_post_meta($post->ID, 'Website', true)); ?></li>
       <li><span class="services">Services Provided: </span> <?php echo esc_html(get_post_meta($post->ID, 'Services', true)); ?></li>
       </ul>
       ```
   
 * Now using CSS I can put a background image on each class with a bit of padding
   so put the image next to each “value”

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

The topic ‘Custom meta data’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [adejones](https://wordpress.org/support/users/adejones/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/custom-meta-data-1/#post-3894639)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
