Getting value from Settings page is not working

Support MB Settings Page Getting value from Settings page is not workingResolved

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38511
    Jolene CreightonJolene Creighton
    Participant

    I've created a settings page and assigned it a custom field using UI and I referred to the documentation to get the value on a custom template 'page-homepage.php' but it's not working.

    Settings page options: https://i.imgur.com/PVOxsr4.png
    Custom field options: https://i.imgur.com/yvWj5Ld.png
    Custom field settings: https://i.imgur.com/hP6yZNT.png

    $value = rwmb_meta( 'featured_1', ['object_type' => 'setting'], 'site-settings');
    echo $value;

    var_dump($value) returns C:\wamp64\www\sands\wp-content\themes\sands-child\page-homepage.php:13:boolean false

    #38512
    Jolene CreightonJolene Creighton
    Participant

    Nevermind, I had the "Option name" in the settings page all wrong, I changed it to "settings-page" and all worked out.

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