Support › MB Settings Page › Use Settings Page for Site Title?Resolved
Wondering if its possible to use the Settings Page w/ Custom Fields to populate the site title? The goal is to keep my clients out of the WP standard settings area but and build the Site Title from a few different entries in teh MB Settings Page.
Yes, it is possible. But you need to use the code to output the field value to the area where you show the site title.
Please read more on the documentation https://docs.metabox.io/extensions/mb-settings-page/#getting-field-value
Hi Long, can you please tell me more how to do this?
I think it's not hard to do. You can find the code that displays the site title in your code (or theme code) and replace it with the helper function rwmb_meta(). Here is an example https://stackoverflow.com/questions/18686523/display-wordpress-site-title
Its an old thread but thanks @Long Nguyen. I found a solution that works for me. I am sharing a snippet (inserted on admin_init) below in case anyone else is interested.
$value_title = rwmb_meta( 'custom_field_site_title', [ 'object_type' => 'setting' ], 'site-options' );
$value_tag = rwmb_meta( 'custom_field_tagline', [ 'object_type' => 'setting' ], 'site-options' );
The snippet updates the options in database whenever the custom fields on the Settings Page are edited.