If you're a WordPress developer, chances are from time to time, you just want a…
Did you know you can add metadata to any object in WordPress? That includes Posts, Custom Post Types, Media… and Users. User meta allows you to store additional information about a user that WordPress doesn’t feature out of the box, like their favorite color or something. If you’re a developer you can use the add_user_meta to add this data to a User. But User Meta Display makes this a lot easier by giving you a simple to use interface for managing and editing user meta information.
What’s It Do?
User Meta Display adds a new options panel which allows you to easily access all of the metadata for any user registered on your site. You can select users by ID, Username, or Display Name from a drop-down menu, and then view all of the metadata associated with that user, even the information gathered by WordPress by default. While browsing this data, you can also edit or remove anything that you see. Lastly, you can also add a user meta key and value with the click of a button.
How’s It Work?
After you install and activate the plugin, you can start viewing user metadata by going to Users -> User Meta Display.
At the top, you’ll see three options next to User List, “ID”, “User Login”, “Display Name”. This is the setting for how you prefer to browse users. Chances are Display Name and User Login are going to be the most helpful for you, but you may have a reason to select by ID. Select your preference by clicking on the button.
Below this, you will see a “User Meta to Display” drop-down menu. This will contain a list of all of the users on your site. Simply select the user you want to view data from, and the user’s meta will automatically appear below. This display will show you all of the metadata associated with the user you selected, including WordPress settings like “admin_color” and any custom metadata you have already added.
As you hover over any row of data you will see two options appear next to it, “Edit” and “Remove.” If you click “Edit” then a pop-up window will appear where you can edit the key and value of the meta. A piece of data’s “key” is the title used to identify it, and the “value” is the actual unique piece of data. So a key will most likely be shared by multiple users (“last_name” is a key for instance), but the values will be different for each one. Keep in mind, default WordPress metadata keys can’t be edited, only their values can. And, of course, clicking the “Remove” link will remove the meta from your database. Be careful with what you remove, this isn’t a reversible process.
You can also choose to add metadata to any individual user by clicking the “Add User Meta” button at the top of the page. Once again, a pop-up form will appear where you can enter a key and value for your metadata. It will then be added to your database and appended to the list.
That’s about it. User Meta Display is great for quickly browsing and editing user metadata on the fly. There are more robust plugins out there which I hope to cover in the future, but for quick tasks, it does the job really well.
Costs, Caveats, Etc.
User Meta Display has been in development for several months and has gone through a few changes already. If you are having any problems with the plugin, visit the support forum to get help from the developers.