Title: get_the_author_meta value?
Last modified: August 19, 2016

---

# get_the_author_meta value?

 *  [theApe](https://wordpress.org/support/users/theape/)
 * (@theape)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/get_the_author_meta-value/)
 * Can anyone show me an example or point me to the right documentation for the 
   following?
 * How do I only show posts from authors who’s user meta value is true of a chosen
   value? For example in the profiles of my users I have a drop down box which allows
   them to choose their country, I can print the country to their descriptions, 
   but What statement would I use to show a one page archive of say all of the posts
   from just users who have selected United States in there profiles?
 * I’ve tried…
 *     ```
       ...loop start...
       $value = get_the_author_meta(get_the_author_ID(), 'country', 'united_states');
       if ($value != NULL) { ?>
       ...content...
       <? }
       ...loop end...
       ```
   
 * and a few other attempts, but nothing seems to produce the results I’m after.
   Thank you for your time!

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

 *  [Agus Suhanto](https://wordpress.org/support/users/suhanto/)
 * (@suhanto)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/get_the_author_meta-value/#post-1645907)
 * In your sample above, the ‘united_states’ should be the value, so it would be:
 *     ```
       $value = get_the_author_meta('country', get_the_author_ID());
       ```
   
 * … and also, the parameter sort order is reversed. Field parameter should come
   before author ID.
 *  Thread Starter [theApe](https://wordpress.org/support/users/theape/)
 * (@theape)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/get_the_author_meta-value/#post-1645911)
 * So…
 *     ```
       $value = get_the_author_meta('country', get_the_author_ID());
       if ($value == 'united_states') {
       ```
   
 * 🙂 Thank you very much!

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

The topic ‘get_the_author_meta value?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [theApe](https://wordpress.org/support/users/theape/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/get_the_author_meta-value/#post-1645911)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
