[wp-hackers] release 2.0.4: add_submenu_page() does not work?

AJ Chen canovaj at gmail.com
Sat Aug 19 21:59:26 GMT 2006

In my new plugin - web2x, i found the same code to add submenu works with
the wordpress code checked out on 5/10/06, but does not work with wordpress
2.0.4 release. See the code below.  Running 2.0.4, the submenu "[project]"
does not appear under Write menu, although the option page is added under
Options.  Has anybody seen problem with add_submenu_page() function?  What's
the fix?

add_action('admin_menu', 'w2x_add_pages');
function w2x_add_pages() {
    // Add submenu under Write:
    add_submenu_page('post-new.php', 'Write Project Post', '[project]', 8,
'prj', 'w2x_show_prj_post');

    // Add a new menu under Options:
    add_options_page('Web2x Options', 'Web2x', 8, __FILE__,


More information about the wp-hackers mailing list