0
当顶级菜单项被点击时,我尝试了加载自定义页面的时间。WordPress的管理菜单
add_menu_page('Hotels', 'Hotels', 'administrator', 8, 'main_menu_foo');
我应该在哪里放置“view-hotels.php”文件?
我想建一个菜单
[Hotels]
[Hotels] //points to view-hotel.php
[Add new...] // points to add-hotel.php
不,这不是我想要的。当你点击帖子>帖子时,一个php文件edit.php被指出。 –
[尝试文档:](http://codex.wordpress.org/Function_Reference/add_menu_page)然后看看[__file__](http://codex.wordpress.org/Function_Reference/plugin_basename) –