Title: shortcode wpmem_field returns empty for select
Last modified: January 28, 2019

---

# shortcode wpmem_field returns empty for select

 *  [mkumar1](https://wordpress.org/support/users/mkumar1/)
 * (@mkumar1)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/shortcode-wpmem_field-returns-empty-for-select/)
 * I’m using the shortcode [wpmem_field <fieldname>] and it returns empty, but only
   when looking at fieldnames with type ‘select’.
 * I can pull text values well. I’m definitely logged in, and the select fields 
   are definitely set with correct values. I’m sure I’m using the right meta key
   name.
 * What I’m actually doing is this:
 * $somevariable = do_shortcode(“[wpmem_field <fieldname>]”);
 * echo $somevariable;
 * The variable is empty but only when fieldname is a select type field name.
    Could
   it be that the variable is holding some sort of non-string object?
 * Little help anyone?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/shortcode-wpmem_field-returns-empty-for-select/#post-11139562)
 * What version are you using? There is an issue with the select field in 3.2.5,
   but it should be resolved in 3.2.5.1. If you are in fact using 3.2.5.1 with the
   same issue, then let me know.
 * BTW, using `do_shortcode()` for displaying a user meta field is [huge waste of resources](https://rocketgeek.com/basics/why-you-should-not-use-do_shortcode/).
   In most cases, it’s better to use `get_user_meta()` instead. (Or use the [`wpmem_do_shortcode()`](https://rocketgeek.com/plugins/wp-members/docs/api-functions/wpmem_do_shortcode/)
   utility, which runs the direct callback function instead of running the full 
   regex that `do_shortcode()` has to run).

Viewing 1 replies (of 1 total)

The topic ‘shortcode wpmem_field returns empty for select’ is closed to new replies.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/shortcode-wpmem_field-returns-empty-for-select/#post-11139562)
 * Status: not resolved