This shortcode is used to get details about multiple WordPress users. aw2_query_users is basically a wrapper to get_users function of WordPress.

Various parameters to get the users is passed as JSON object. The value returned by this shortcode is accessed by looping though the collection.

  • id:

    If specified the result collection is created with this ‘id’. It defaults to default_collection.
  • cond:

    We can pass various conditional parameters with this shortcode to decide when it can execute.

JSON attributes that you can specify are mentioned below, details about each key is available at get_users

  • blog_id
  • role
  • meta_key
  • meta_value
  • meta_compare
  • meta_query
  • date_query
  • include
  • exclude
  • orderby
  • order
  • offset
  • search
  • number
  • count_total
  • fields
  • who
    • Examples of using aw2_query_users:

      Get username and email of all subscribers

      Another example