Group value from Settings page

Support MB Settings Page Group value from Settings pageResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26847
    SridharSridhar
    Participant

    Hi,

    I am trying to get the value of a group having the ID of branding from a settings page.

    The following is not generating any output. Any idea?

    <?php
        $group_value = rwmb_meta( 'branding', ['object_type' => 'setting'], 'my_options' );
        
        print_r( $group_value );
    ?>
    #26856
    Long NguyenLong Nguyen
    Moderator

    Hi Sridhar,

    Thank you for getting in touch.

    Did you miss the prefix settings_ of the field ID? Just like

    rwmb_meta( 'settings_branding', ['object_type' => 'setting'], 'my_options' )

    If it still does not work, please share the code that creates the field, I will help you to check it.

    #26923
    SridharSridhar
    Participant

    Yes. As usual, I forgot about the prefix.

    All good now.

    Wrote about this at https://wpdevdesign.com/getting-url-of-a-groups-image-field-from-settings-page-in-meta-box/.

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