您好,我正在通过阅读WPTUT上的WordPress设置Api的完整指南来学习向WordPress主题添加主题选项。我已经读到了第四部分,并停下来为自己创建了一个示例,因为我对如何在页面中添加我创建的部分感到困惑。这是我的代码:
function thanatos_theme_menu(){
add_theme_page(
"Thanathos Theme Options",
"Thanathos Theme",
"administrator",
"thanathos_theme_options",
"thanathos_theme_display_callback"
);
}
add_action(\'admin_menu\' , \'thanatos_theme_menu\');
function thanathos_theme_display_callback(){
echo "Johny la hanta este mui loca";
}
add_action(\'admin_init\' , \'thanatos_initializa_theme_options\');
function thanatos_initializa_theme_options(){
add_settings_section(
\'general_settings_section\',
\'Thanatos Options\',
\'thanatos_general_options_callback\',
\'thanathos_theme_options\' //I believe this where my mistakes is
);
}
function thanatos_general_options_callback(){
echo \'mergem la mare\';
}
我使用了页面id来设置该节的放置位置,我相信thanatos\\u general\\u options\\u callback()应该显示在那里,但由于某些原因,它没有显示。我在这里做错了什么?