Title: Admin_menu function not working
Last modified: August 19, 2016

---

# Admin_menu function not working

 *  Resolved [tinwatchman](https://wordpress.org/support/users/tinwatchman/)
 * (@tinwatchman)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/admin_menu-function-not-working/)
 * So I’m trying to develop a custom plugin for a site that I’m working on, and 
   I’m having an unexpectedly difficult time with it. Right now, I can’t seem to
   get a top-level menu to show up using the admin_menu function. I’ve been going
   around and around, and I can’t seem to figure out why. Does anyone have any clue
   what I’m doing wrong?
 * Here’s my code so far, with some details changed:
 *     ```
       (also some database stuff above, but that seems to be in working order)
   
       function myprefix_add_new() { ?>
       	<div class="wrap">
                 <h2>My Title Goes Here</h2>
               </div>
           </div>
       <?php }
   
       function myprefix_admin_menu_add() {
       	$mymainpage = add_menu_page("My Page Title","My Page Title",1,__FILE__,'myprefix_add_new');
       }
   
       add_action('admin-menu','myprefix_admin_menu_add');
   
       ?>
       ```
   
 * Does anyone see what I could be doing wrong? Or have done wrong?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [tinwatchman](https://wordpress.org/support/users/tinwatchman/)
 * (@tinwatchman)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/admin_menu-function-not-working/#post-1196117)
 * bump. Could really use some help here…
 *  Thread Starter [tinwatchman](https://wordpress.org/support/users/tinwatchman/)
 * (@tinwatchman)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/admin_menu-function-not-working/#post-1196303)
 * bump
 *  Thread Starter [tinwatchman](https://wordpress.org/support/users/tinwatchman/)
 * (@tinwatchman)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/admin_menu-function-not-working/#post-1196344)
 * Sigh. admin_menu. Not admin-menu, admin_menu. It’s an underscore. Sorry for bothering
   you, everyone.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Admin_menu function not working’ is closed to new replies.

## Tags

 * [admin_menu](https://wordpress.org/support/topic-tag/admin_menu/)
 * [development](https://wordpress.org/support/topic-tag/development/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [help needed](https://wordpress.org/support/topic-tag/help-needed/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [plugin-development](https://wordpress.org/support/topic-tag/plugin-development/)

 * 3 replies
 * 1 participant
 * Last reply from: [tinwatchman](https://wordpress.org/support/users/tinwatchman/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/admin_menu-function-not-working/#post-1196344)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
