WordPress插件自定义菜单和子菜单

时间:2015-04-29 11:07:26

标签: wordpress

我在word press中做了相当不错的菜单和子菜单,但是当我点击菜单(jobify)时,它表示找不到URL。我的子菜单工作正常。

 <?php

//添加自定义管理菜单 add_action(“admin_menu”,“addMenu”);

//自定义管理菜单的功能 function addMenu(){     add_menu_page(“Jobify Menu”,“Jobify”,“manage_options”,“jobifyAdminMenu”,'',null,3);     add_submenu_page('jobify.php','user','User','manage_options','userSubMenu','user_manage');     add_submenu_page('jobify.php','jobs','Jobs','manage_options','jobsSubMenu','jobs_mangae');     add_submenu_page('jobify.php','setting','Setting','manage_options','settingSubMenu','setting_manage'); }

function user_manage(){

include plugin_dir_path( __FILE__ ) . 'user.php';

}
?&GT;

0 个答案:

没有答案