我得到一个无法修改我的functions.php上的标题信息错误,更具体地说是一个包含的文件(这不是问题)。
Warning: Cannot modify header information - headers already sent by (output started at /home/yc/domains/yc.keytoe.nl/public_html/wp-content/themes/yourconnector/inc/metaboxes.php:6) in /home/yc/domains/yc.keytoe.nl/public_html/wp-includes/pluggable.php on line 881
Metaboxes.php是我的metabox文件,其中我有我的所有代码。一切正常,除了试图保存任何东西,我得到一个空白页面。保存是成功的,但我必须手动返回到wp-admin,这显然不是它应该如何工作。
我的metaboxes.php代码是:
<?
// --- METABOX CREATE --- //
add_action('admin_init', 'page_spec_meta');
function page_spec_meta(){
(this is line 6) $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; $template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
if ($template_file == 'talenten.php')
{
add_meta_box("career-meta", "Career", "career_meta", "page", "normal", "high");
add_meta_box("business-meta", "Business", "business_meta", "page", "normal", "high");
add_meta_box("inspired-meta", "inspired", "inspired_meta", "page", "normal", "high");
add_meta_box("network-meta", "Network", "network_meta", "page", "normal", "high");
add_meta_box("future-meta", "Future", "future_meta", "page", "normal", "high");
}
if ($template_file == 'bedrijven.php')
{
add_meta_box("unique-meta", "Unique", "unique_meta", "page", "normal", "high");
add_meta_box("providing-meta", "Providing", "providing_meta", "page", "normal", "high");
add_meta_box("inspired-meta", "inspired", "inspired_meta", "page", "normal", "high");
add_meta_box("network-meta", "Network", "network_meta", "page", "normal", "high");
add_meta_box("future-meta", "Future", "future_meta", "page", "normal", "high");
}
}
....rest of the page
?>
我无法弄清楚出了什么问题。它不能是空格,检查所有这些。