繁体   English   中英

在Wordpress后端中更改自定义设置页面的位置

[英]Change location of custom settings page in wordpress backend

我如何适应以下代码在wordpress后端的“外观”下显示自定义“主题设置”页面,而不在“设置”下显示我的自定义“主题设置”页面?

add_action('admin_menu', 'theme_options_page'); function theme_options_page() { add_options_page('Theme Settings', 'Theme Settings', 'administrator', __FILE__, 'build_options_page');

在这里您可以找到完整的代码片段

使用add_submenu_page

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
}

对于在外观下使用themes.php作为parent_slug

或者你也可以使用

使用add_theme_page

add_theme_page( 'this is page Title', 'Theme Options', 'manage_options', 'custom_options', 'custom_function' );

欲了解更多信息,请检查您可以检查

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM