Settings Page Style
Support › MB Settings Page › Settings Page StyleResolved
- This topic has 14 replies, 6 voices, and was last updated 4 years, 8 months ago by
Teia Local Studio.
-
AuthorPosts
-
January 17, 2020 at 10:46 PM #17884
prafgon
ParticipantHi there!
I recently decided to update the Settings Page extension and it appears that it breaks the style? The "style" => "no-boxes" option seems to be completely ignored and I keep seeing the boxed layout.
Once I load the old settings page version, everything works like a charm again?
Regards,
FilipJanuary 18, 2020 at 3:17 PM #17895Anh Tran
KeymasterHi Filip,
I've just tested and it works well. Can you share your code?
May 8, 2020 at 2:41 PM #19526ComSi
ParticipantI think I have the same problem, I think I found out why. To me this looks like a bug.
When you have just
style=no-boxes
andcolumns=1
set, nothing changed and you still get the boxed layout.
When you add thetabs
key, then theno-boxes
layout kicks in.$settings_pages[] = [ 'id' => 'vacancies', 'option_name' => 'vacancy', 'menu_title' => __('Vacancies', 'vac'), 'parent' => 'options-general.php', 'style' => 'no-boxes', 'columns' => 1, // remove this and the box layout appears 'tabs' => [ 'test' => "Test" ] ];
This is undesirable because we just want to mimic a normal WP settings page, those don't have tabs and no white boxes.
Or am I missing something?
May 8, 2020 at 4:01 PM #19528Long Nguyen
ModeratorHi,
Thank you. I'm going to check it out and let you know later.
May 29, 2020 at 3:59 AM #19885Content Pilot
ParticipantHi Long, I am seeing the same thing. no-boxes style is being ignored if tabs are not present. I think myself and the other commentators want a single page, flat settings page. no tabs, no boxes, just basic fields. Thanks
public function settings_page( array $settings_pages ) : array { $settings_pages[] = array( 'id' => 'social-media', 'option_name' => 'poa', 'menu_title' => esc_html__( 'Social Media', 'poa' ), 'parent' => 'options-general.php', 'style' => 'no-boxes', 'columns' => 1, ); return $settings_pages; }
May 29, 2020 at 9:19 AM #19892Long Nguyen
ModeratorHi guys,
Please update the latest version of MB AIO to v1.11.9 or MB Settings Page to v2.1.1 to fix this issue.
May 29, 2020 at 12:47 PM #19910ComSi
ParticipantHi Long,
This fixes the issue. Great work, thanks a lot!
May 29, 2020 at 8:38 PM #19919Content Pilot
ParticipantHi Long, thanks for pushing a patch. I am using Composer to load this plugin with this code
"meta-box/mb-settings-page": "dev-master"
But after running this command, Composer says there is nothing to update.
composer update meta-box/mb-settings-page
Do you all need to push the code to the master branch or tag the release?
May 29, 2020 at 8:40 PM #19920ComSi
Participant@content Pilot
You need to clear the composer cache and re-install (not update) the vendor plugins.
rm -rf vendor && composer clear-cache && composer install
See the docs here: https://docs.metabox.io/extensions/composer/#versions--updates
May 29, 2020 at 9:03 PM #19922Content Pilot
Participant@Comsi. bless you. it's always the cache, isn't it?
May 29, 2020 at 10:25 PM #19927ComSi
ParticipantAin't that the truth. 😉
September 3, 2020 at 3:07 AM #21604Teia Local Studio
ParticipantHey there!
Is that possible to have the "style" => "seamless" on a specific BOX inside a tabbed settings panel?
If I set SEAMLESS in the box anywhere inside a page, or CPT, it works fine. But inside the setting page, does not.
$meta_boxes[] = array( 'id' => 'my-id', 'title' => 'my-title', 'settings_pages' => 'panel-abc', 'tab' => 'tab-123, 'style' => 'seamless', 'fields' => array( array( 'name' => 'Setting name', 'id' => 'sett-id', 'type' => 'text', 'class' => 'my-class', 'columns' => 6 ), array( 'name' => 'Other setting name', 'id' => 'sett-id-2', 'type' => 'text', 'class' => 'my-class', 'columns' => 6 ) ) );
Thank you!!!
G.September 3, 2020 at 3:10 PM #21616Long Nguyen
ModeratorHi,
Thanks for your idea, I'm going to create a feature request to support style seamless (no-box) in the setting page for specific meta boxes.
September 5, 2020 at 3:31 PM #21673Long Nguyen
ModeratorSolved in MB Settings Page v2.1.3, MB AIO will be released later.
- $settings_pages:
'style' => 'boxes'
- $meta_boxes:
'style' => 'seamless'
September 5, 2020 at 6:52 PM #21677Teia Local Studio
ParticipantTHANK YOU!
SO MUCH. - $settings_pages:
-
AuthorPosts
- You must be logged in to reply to this topic.