Support » Fixing WordPress » How to add hidden options page in admin panel?

  • Mal

    (@looimaster)


    All these functions attach options page to left menu:

    add_menu_page(), remove_menu_page(), add_submenu_page(), remove_submenu_page(), add_dashboard_page(), add_posts_page(), add_media_page(), add_links_page(), add_pages_page(), add_comments_page(), add_theme_page(), add_plugins_page(), add_users_page(), add_management_page(), add_options_page()

    I want to create an options page for top admin bar (not just custom link). How to do that?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Those admin-bar ‘pages’ are just shortcuts to the admin pages that also show up on the left. I don’t know that you can add a functioning wp-admin options page to the admin-bar without also adding it to the menu on the left, but you can add links and other items to the admin-bar.

    http://wp-snippets.com/addremove-wp-admin-bar-links/

    http://wordpress.org/support/topic/quotes-in-the-admin-bar?replies=10

    Thread Starter Mal

    (@looimaster)

    Okay, I understand.

    Is there any way to hide it from left menu? But I want it to be still accessible by administrator. I just want it to be only no top if possible.

    You could probably hide the left sidebar menu using CSS. It would still be there but wouldn’t be visible. Really, why do you need to hide it though? If you register the menu with the correct permissions, only the administrator(s) will see it.

    Thread Starter Mal

    (@looimaster)

    Thanks! I need to hide it for aesthetic purposes. I just need to move one menu to admin bar but I don’t need this one on the left side at all.

    “If you register the menu with the correct permissions, only the administrator(s) will see it.”

    – I think that’s true for all placements anyway.

    Aren’t there any other ways to hide it? Like using “add_options_page()” but without location specified or something like that.

    – I think that’s true for all placements anyway.

    Yes.

    You can’t register an administrative page without specifying a ‘location’. You might be able to hook a function to one or more of the admin actions or filters and manipulate the arrays used in creating those menus without actually destroying the functionality of the page, but I haven’t done it so I can’t tell you how to do it. And it is one of those things that I’d consider fraught with danger anyway.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add hidden options page in admin panel?’ is closed to new replies.