Forum Replies Created
-
AuthorPosts
-
Martin Rybos
ParticipantI love you !!
You are greatMartin Rybos
ParticipantEasy. Thank you
Martin Rybos
ParticipantI think it is.
add_filter( 'mb_settings_pages', function ( $settings_pages ) { $settings_pages[] = array( 'id' => 'dimainsettings', //settings field ID 'option_name' => 'DiSettings', // $option_name 'menu_title' => 'DiSettings', 'icon_url' => 'dashicons-edit', 'style' => 'no-boxes', 'columns' => 1, 'tabs' => array( 'general' => 'General Settings', 'faq' => 'FAQ & Help', ), ); return $settings_pages; }); add_filter( 'rwmb_meta_boxes', 'meta_box_group_demo_register' ); function meta_box_group_demo_register( $meta_boxes ) { //mainsettingspage $meta_boxes[] = array( 'id' => 'general', 'title' => 'General', 'settings_pages' => 'dimainsettings', 'tab' => 'general', 'fields' => array( array( 'name' => 'Logo', 'id' => 'logo', 'type' => 'file_input', ), array( 'name' => 'Meta Description', 'id' => 'meta_description', // field ID 'type' => 'textarea', 'placeholder' => 'Meta Description', 'rows' => 4, ), array( 'name' => 'Meta Keywords', 'id' => 'meta_keywords', 'type' => 'textarea', 'placeholder' => 'Meta Description', 'rows' => 4, ), ), ); $meta_boxes[] = array( 'id' => 'info', 'title' => 'Theme Info', 'settings_pages' => 'dimainsettings', 'tab' => 'faq', 'fields' => array( array( 'type' => 'custom_html', 'std' => 'Having questions? Check out our documentation', ), ), ); //mainsettingspageMartin Rybos
ParticipantI probably don't put the code in the right place.
I'm mixing a meta box with settings
whole code is: https://pastebin.com/PPRYQz6vMartin Rybos
ParticipantHi.Thanks.I can't get it to work. I have something wrong there. But i'm close
$value = rwmb_meta( $field_id, ['object_type' => 'setting'], $option_name ); echo $value;$field_id - is field ID of meta_description
['object_type' => 'setting'] - remains unchanged or i need to rename setting ?$option_name - opton name of setting page - DiSettings in my case
Do i need to add bellow hook to my php to get it work ?
add_action( 'mb_settings_page_load', function ( $args ) { if ( $args['id'] === 'dimainsettings' ) { // Do something } }, 20 );Martin Rybos
ParticipantOk. thanks it is working but. When i select 3 images to gallery.
Foreach create 8 images and the last 5 images are the same.
Do you know why ?
This is a page
lightbox
Icon at the bttom right open lightbox.Martin Rybos
ParticipantThank you. Works
Martin Rybos
ParticipantI don't have meta box in main menu, only in installed plugins
-
AuthorPosts