Title: Include field value in shortcode?
Last modified: August 30, 2016

---

# Include field value in shortcode?

 *  Resolved [LS](https://wordpress.org/support/users/lsterling03/)
 * (@lsterling03)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-field-value-in-shortcode/)
 * Hi. I’m using AMR regular version with the Grouping add-on. I’ve created a list
   with several parameters, but I’d like to use the shortcode to split up the list
   a little more on the front end (because I want to limit the number of lists I
   have to create in the admin).
 * My question… is there a parameter for the shortcode to display the list based
   on a specific value? For example, I have field name “dbem_region” and I want 
   to show only users with a value of “1”. I know I can do this in the list settings,
   but I want to do it in the shortcode.
 * Is something like this possible:
 * `[userlist list=12 dbem_region=1]`
 * I couldn’t find it in the documentation. Thank you!
 * [https://wordpress.org/plugins/amr-users/](https://wordpress.org/plugins/amr-users/)

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

 *  Plugin Author [anmari](https://wordpress.org/support/users/anmari/)
 * (@anmari)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-field-value-in-shortcode/#post-6585901)
 * [https://wpusersplugin.com/2876/simple-column-filtering-in-amr-users-lists/](https://wpusersplugin.com/2876/simple-column-filtering-in-amr-users-lists/)
 * works from url – can’t think right now if it works as shortcode parameter, no
   time to check – try something like
    [userlist list=12 filter=1 dbem_region=1]
 *  Thread Starter [LS](https://wordpress.org/support/users/lsterling03/)
 * (@lsterling03)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-field-value-in-shortcode/#post-6585936)
 * Ah, I got it to work. It was a combination of things. First, I needed to include
   filter=1 in my shortcode (the example you provided above works). Second, I needed
   to include ALL the dbem_region values in the Configure This List Settings in 
   order to use it as a filter. I didn’t include that fieldname as part of the orginal
   list, because I thought I could just use it in the shortcode. But, apparently
   you have to explicitly include all the values for a field if you want to filter
   by that field.
 * Thank you!
 *  Thread Starter [LS](https://wordpress.org/support/users/lsterling03/)
 * (@lsterling03)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-field-value-in-shortcode/#post-6585938)
 * One more note — this only works if you also DISPLAY the dbem_region field. I 
   though I could include the region field values, and then remove the display by
   deleting the “display order” field . But, that breaks the filtering. You have
   to include AND display the values if you want to use the shortcode or URL to 
   filter it.
 * Is there a way to do it so I don’t have to display the region value on the front
   end? If not, I’ll just try to hide it with CSS.
 * Thanks!

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

The topic ‘Include field value in shortcode?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amr-users_f6f6f4.svg)
 * [amr users](https://wordpress.org/plugins/amr-users/)
 * [Support Threads](https://wordpress.org/support/plugin/amr-users/)
 * [Active Topics](https://wordpress.org/support/plugin/amr-users/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amr-users/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amr-users/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 3 replies
 * 2 participants
 * Last reply from: [LS](https://wordpress.org/support/users/lsterling03/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/include-field-value-in-shortcode/#post-6585938)
 * Status: resolved