How to display custom field (type:Image select)

Support MB User Meta How to display custom field (type:Image select)Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #41179
    leennleenn
    Participant

    Hi,

    My custom field using "Image Selcet" type. like
    A:image url1
    B:image url2

    I put this code in "My-account" page.

    <?php
    echo rwmb_meta( 'mb_membership', ['object_type' => 'user'], get_current_user_id() )	
    ?>

    Now it only display option text A, could you please let me know how to display both
    A and image 1

    thank you.

    #41186
    PeterPeter
    Moderator

    Hello,

    You can use the function rwmb_the_value() to output the field label instead of the field value. Read more in the documentation https://docs.metabox.io/functions/rwmb-the-value/

    #41196
    leennleenn
    Participant

    Hi Peter,

    It works. Thank you.

    <?php
    $value = rwmb_the_value( 'mb_membership', ['object_type' => 'user'], get_current_user_id())
    ?>

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