Custom Fields
Re-Envisioned › Support › Meta Box Builder › Settings page not showing in top level, only as submenu
- This topic has 12 replies, 2 voices, and was last updated 4 days, 21 hours ago by
Long Nguyen.
-
CreatorTopic
-
February 9, 2021 at 4:42 PM #24400
David Kraljic
ParticipantHi, We created a settings page. It does show up when set to display as a sub menu in the admin. But when we set it to display as a top level admin item it doesn’t show. Here is a screenshot
https://share.getcloudapp.com/YEuXpBEj -
CreatorTopic
-
AuthorReplies
-
February 9, 2021 at 5:57 PM #24402
David Kraljic
ParticipantWe created a settings page via code (not UI controls). The settings page does show in the admin UI as expected. However, it doesn’t show in the Metabox settings page list. Is there a way to have it appear there as well?
February 9, 2021 at 7:31 PM #24404Long Nguyen
ModeratorHi David,
Please select a Style option
Boxes
orNo Boxes
then re-save the settings page to make it works. I’m going to discuss with the developer team to cover this case in the next update.February 9, 2021 at 8:22 PM #24405David Kraljic
ParticipantThanks. I just tried and it didn’t make the page appear. https://share.getcloudapp.com/kpu75lAR
February 10, 2021 at 6:24 PM #24418Long Nguyen
ModeratorHi,
Can you please click on “Get PHP code” and share the code here? I will check the code on my end.
February 13, 2021 at 4:09 AM #24433David Kraljic
Participant<?php add_filter( 'mb_settings_pages', 'your_prefix_function_name' ); function your_prefix_function_name( $settings_pages ) { $settings_pages[] = [ 'menu_title' => __( 'Pencil 2', 'your-text-domain' ), 'id' => 'pencil-2', 'option_name' => 'Pencil2', 'position' => 90, 'submenu_title' => 'test', 'parent' => 'options-general.php', 'columns' => 1, 'help_tabs' => __( 'Here is help content - where does it show up?', 'your-text-domain' ), 'customizer' => true, 'icon_url' => 'editor-paste-text', ]; return $settings_pages; }
February 13, 2021 at 4:10 AM #24434David Kraljic
ParticipantHere is a fresh screenshot of the issue
https://share.getcloudapp.com/xQunnDYnFebruary 13, 2021 at 5:09 AM #24436David Kraljic
ParticipantWe created several test settings pages
Pencil5 – shows on wp admin – not on customizer
Well it does but only for a second, then disappears. I see CSS is set to display none.
I created it purely through code (not through admin UI).
https://inspiration.homecarestaged.wpengine.com/wp-admin/admin.php?page=edit-snippet&id=9
Now we have to figure out why it disappears.Pencil2 – appears in customizer but not wpadmin
It was created through the UI
https://inspiration.homecarestaged.wpengine.com/wp-admin/post.php?post=554&action=editWhat I want is for one of them to show up on both customizer and wpadmin
Hmmm… now that I write this I wonder if this is even possible. Maybe it is one or the other?February 13, 2021 at 5:11 AM #24437David Kraljic
ParticipantOn pencil2 I just unchecked the show in customizer box to see if that would make it show in the wpadmin – it did not. I even reset the style to noboxes, resaved and still pencil2 doesn’t appear in wpadmin
February 13, 2021 at 5:14 AM #24438David Kraljic
ParticipantOk I found that pencil2 is showing in wpadmin under “settings” even though we have it set to be top level under “SEO” item. So it seems the “menu type” setting on metabox is being ignored.
February 13, 2021 at 5:17 AM #24439David Kraljic
ParticipantSo the questions I need answered are:
-
Why is pencil2 not respecting the show as top level menu setting so that it can show in the wpadmin top level
-
Why is pencil5 not respecting the show in customizer setting and being hidden with display none in css?
-
-
AuthorReplies
- You must be logged in to reply to this topic.