Settings page not showing in top level, only as submenu

Support MB Builder Settings page not showing in top level, only as submenuResolved

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #24400
    David KraljicDavid Kraljic
    Participant

    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

    #24402
    David KraljicDavid Kraljic
    Participant

    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?

    #24404
    Long NguyenLong Nguyen
    Moderator

    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.

    #24405
    David KraljicDavid Kraljic
    Participant

    Thanks. I just tried and it didn't make the page appear. https://share.getcloudapp.com/kpu75lAR

    #24418
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Can you please click on "Get PHP code" and share the code here? I will check the code on my end.

    #24433
    David KraljicDavid 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;
    
    }
    #24434
    David KraljicDavid Kraljic
    Participant

    Here is a fresh screenshot of the issue
    https://share.getcloudapp.com/xQunnDYn

    #24436
    David KraljicDavid Kraljic
    Participant

    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?

    #24437
    David KraljicDavid Kraljic
    Participant

    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

    #24438
    David KraljicDavid Kraljic
    Participant

    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.

    #24439
    David KraljicDavid Kraljic
    Participant

    So the questions I need answered are:

    1. Why is pencil2 not respecting the show as top level menu setting so that it can show in the wpadmin top level

    2. Why is pencil5 not respecting the show in customizer setting and being hidden with display none in css?

    #24440
    David KraljicDavid Kraljic
    Participant

    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.

    #24587
    Long NguyenLong Nguyen
    Moderator

    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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.