FacetWP – User Post Type
This plugin gives you the ability to attach users to a post type, allowing you to build user listings and filter users in the same manner as you would any other post type.
How it works
This plugin will create a new hidden post type called upt user, as well as a post for each individual user.
Setup
Click the “Sync now” button once you’ve navigated to the Settings menu and selected User Post Type.
You may also transfer more data into the postmeta table, as was just demonstrated for you above. This is not necessary to show fields; rather, meta query is the sole place where it can be beneficial.
Here is a list of the dropdown options and the meta query keys that relate to them:
Option                                 Meta Key
User IDÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ID
User Login                            user_login
User Email                            user_email
User URLÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â user_url
Registration Date                      user_registered
User Status                            user_status
Display Name                         display_name
Roles                                     roles
Usermeta field            meta-zipcode (keys are prefixed with meta-)
BuddyPress field           bp-123 (field IDs are prefixed with bp-)
Displaying users
Use the WP Query function (not the WP User Query function) in the following manner to show a list of users:
Displaying a subset of users
Choose “Roles” from the dropdown menu on the settings page, then “Sync,” so that only administrators are seen. After that, make use of the field included within meta query:
The same thing applies with various roles, such as administrators and editors in this case:
Displaying user fields
UPT supports WP user functions; just replace $user_id
 with UPT()->get_user_id()
.
Outside of The Loop, pass in the post ID like so:
Reviews
There are no reviews yet.