Php 更改自定义设置页面在wordpress后端中的位置
如何调整以下代码以在wordpress后端的“外观”下而不是“设置”下显示我的自定义“主题设置”页面Php 更改自定义设置页面在wordpress后端中的位置,php,wordpress,Php,Wordpress,如何调整以下代码以在wordpress后端的“外观”下而不是“设置”下显示我的自定义“主题设置”页面 add_action('admin_menu', 'theme_options_page'); function theme_options_page() { add_options_page('Theme Settings', 'Theme Settings', 'administrator', __FILE__, 'build_options_page'); 您可以使用添加子菜单\u页面
add_action('admin_menu', 'theme_options_page'); function theme_options_page() { add_options_page('Theme Settings', 'Theme Settings', 'administrator', __FILE__, 'build_options_page');
您可以使用
添加子菜单\u页面
add_submenu_page( themes.php, 'Title of Page', 'Theme Options', 'manage_options', 'custom_options', 'custom_function' );
function custom_function()
{
// add your form code here or include a file here
}
add_theme_page( 'this is page Title', 'Theme Options', 'manage_options', 'custom_options', 'custom_function' );
在外观下使用themes.php
作为parent\u slug
或者你也可以使用
使用添加主题页面
add_submenu_page( themes.php, 'Title of Page', 'Theme Options', 'manage_options', 'custom_options', 'custom_function' );
function custom_function()
{
// add your form code here or include a file here
}
add_theme_page( 'this is page Title', 'Theme Options', 'manage_options', 'custom_options', 'custom_function' );
欲了解更多信息,请查看
thx,你能帮我更改代码,使其显示在外观下吗?我试过了,但不知道该怎么做。请按照我问题中“此处”下的url进行操作,在那里你会找到我使用的代码。谢谢