WordPress.org

Support

Support » How-To and Troubleshooting » add_submenu_page Problem!

add_submenu_page Problem!

  • Hi all, I have an easy question for you.

    I’d like to know if there’s a way to hide a menu entry in this way.

    I have an internal admin search plugin that I’ve done, it has the main menu voice, with at the moment two voices:
    Admin General Search
    |_ Search
    |_ Results

    The Results voice is the page where I can see the results and it was blank if I don’t use the search form in the Search page.
    But if I remove this part of code:
    add_submenu_page(__FILE__, 'Search Results', 'Search Results', 0, 'searchresults', 'searchresults_menu');

    It tells me:

    You do not have sufficient permissions to access this page.

    Any hint on how to fix my problem?

  • The topic ‘add_submenu_page Problem!’ is closed to new replies.
Skip to toolbar