Title: Custom Fields &#8211; problems displaying individual keys
Last modified: August 19, 2016

---

# Custom Fields – problems displaying individual keys

 *  [maxcap](https://wordpress.org/support/users/maxcap/)
 * (@maxcap)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/custom-fields-problems-displaying-individual-keys/)
 * Hi
 * I want to be able to display individual values of keys within a post, but am 
   having problems doing so. I’ve tried all the variations available on this forum.
 * Key: client
    Value: Joe Blogg
 * The code I am using is:
 *     ```
       <?php $client = get_post_meta($post->ID, 'client', true); ?>
       <?php echo($client) ?>
       ```
   
 * However, nothing is displayed in the post.
 * When I use to test:
    `<?php the_meta(); ?>`
 * It works fine, displaying “client: Joe Bloggs”, but this isn’t what I need (I
   only need the value). The code is absolutely positively within the loop.
 * Can anybody help? I’ve exhausted my limited knowledge of PHP!
    Thanks, Max

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/custom-fields-problems-displaying-individual-keys/#post-963174)
 * This works for me:
 *     ```
       <?php $client = get_post_meta($post->ID, 'client', true); ?>
       <?php echo $client; ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Custom Fields – problems displaying individual keys’ is closed to new
replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [get_post_meta](https://wordpress.org/support/topic-tag/get_post_meta/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [the_meta()](https://wordpress.org/support/topic-tag/the_meta/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/custom-fields-problems-displaying-individual-keys/#post-963174)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
