我想为我的wordpress主题创建一个自定义选项主题页面,我发现这个教程 http://wp.tutsplus.com/tutorials/theme-development/create-a-settings-page-for-your-wordpress-theme/,但问题是它不起作用,恐怕太过时了。我使用的是wordpress 3.7.1。我添加并试图创建WordPress的主题设置页面中的功能是如何在Wordpress中创建自定义主题选项页面?
function setup_theme_admin_menus() {
add_submenu_page('themes.php',
'Front Page Elements', 'Front Page', 'manage_options',
'front-page-elements', 'theme_front_page_settings');
}
function theme_front_page_settings() {
echo "Hello, world!";
}
而且我把我的主题functions.php的,但什么都没有发生。
你不会感到与大的文章混淆,请点击这里 - http://www.kvcodes.com/2016/10/creating-custom-options-page-wordpress/ – Kvvaradha