Meta Box
Support Forum
Support › MB Views › View - Can I pull User info
If I have UserId can I use a MB VIEW to pull First Name, Last Name, custom fields...etc
I cannot locate any code examples.
Thanks in advance.
Hello,
In the view editor, you can use the proxy mb. and WordPress functions (or any PHP functions) to get the user data from the user ID. For example: WP function get_userdata()
mb.
{% set user_data = mb.get_userdata( 3 ) %} {{ user_data.first_name }}
Following the documentation https://docs.metabox.io/extensions/mb-views/#running-php-functions