Customizer and Tabs
- This topic has 2 replies, 2 voices, and was last updated 4 years, 11 months ago by
[email protected].
-
AuthorPosts
-
December 15, 2020 at 1:49 AM #23534
[email protected]
ParticipantHi all,
I have my site settings page created and organized using the MB tab plugin. It looks great in the WP dashboard page. I also have it set too work in the customizer. It appears in the customizer, but it shows a tabbed design instead of individual panels.Could you help me understand how to make it appear as individual panels in customizer, but keep the tabbed design in the Dashboard?
This is the customizer image
https://www.dropbox.com/s/zgdupieggxk4ola/Screen%20Shot%202020-12-14%20at%201.45.09%20PM.png?dl=0Here is the site settings dashboard page
https://www.dropbox.com/s/1k8uj9whrotm7pw/Screen%20Shot%202020-12-14%20at%201.45.47%20PM.png?dl=0I'd like it to appear like this:
https://www.dropbox.com/s/qotqmthhf7k4sdf/Screen%20Shot%202020-12-14%20at%201.47.46%20PM.png?dl=0Here is the opening part of my code:
// Site Info Settings add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { // Church Information Section $meta_boxes[] = array( 'id' => 'church-info', 'title' => 'Church Information', 'settings_pages' => 'site-info', 'fields' => array( array ( 'id' => 'single_image_church', 'type' => 'single_image', 'name' => esc_html__( 'Church Image', 'text-domain' ), 'tab' => 'ta_set1', ), array( 'name' => 'Church Name', 'id' => 'text', 'type' => 'text', 'placeholder' => 'Church Name', 'size' => 30, 'tab' => 'ta_set1', ),Thanks,
EricDecember 15, 2020 at 11:37 AM #23545Long Nguyen
ModeratorHi Eric,
When using Tabs with Settings Page, you should define the
tabin the meta boxes setting. Please follow this sample code https://github.com/wpmetabox/library/blob/master/extensions/mb-settings-page/conditional-tabs.php.Let me know how it goes.
December 16, 2020 at 3:41 AM #23555[email protected]
ParticipantHi,
Yes, that helped. It took a little time to sort out, but I was able to reformat the tabs so they both look good in the customizer and the dashboard.
thanks,
eric -
AuthorPosts
- You must be logged in to reply to this topic.