Support Forum
Support › Meta Box Builder › Settings page not showing in top level, only as submenuResolved
Hi, 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
We 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?
Hi David,
Please select a Style option Boxes
or No 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.
Thanks. I just tried and it didn't make the page appear. https://share.getcloudapp.com/kpu75lAR
Hi,
Can you please click on "Get PHP code" and share the code here? I will check the code on my end.
<?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;
}
Here is a fresh screenshot of the issue
https://share.getcloudapp.com/xQunnDYn
We 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=edit
What 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?
On 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
Ok 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.
So 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?
Mystery solved for pencil5
We were inserting the code via "snippets" plugin. Plugin was set to run snippet only on admin. When revising this to run everywhere pencil5 now shows in both the customizer and wpadmin.
Pencile2 was not created through snippets plugin so the question about pencil2 still remains.
Hi David,
Please update the new version of MB Builder 4.0.5 or MB AIO 1.13.4 then clear the cache and re-check this issue.
Let me know how it goes.