How to show user profile field for specific user (not current or author)?

Support MB Views How to show user profile field for specific user (not current or author)?Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30823
    EddyPiVEddyPiV
    Participant

    Hi,

    I want to show whether a specific user (the admin/host of a members site) is online, busy or offline.
    So I have added a field group for this purpose. Works all fine.
    How do I show the status for that user?

    This is what I tried:
    {% set admin = mb.get_user_by('id', 133) %}
    {{ admin.radio_mb1qf9lcy2b.value }}

    But nothing is shown.

    #30824
    Long NguyenLong Nguyen
    Moderator

    Hi,

    To get the user meta value, please follow this documentation https://docs.metabox.io/extensions/mb-user-meta/#getting-field-value

    For example:

    {% set admin_status = mb.rwmb_meta( 'radio_mb1qf9lcy2b', {object_type: 'user'}, 133 ) %}
    {{ admin_status }}
    #30826
    EddyPiVEddyPiV
    Participant

    Thanks Long.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.