Support » Themes and Templates » Spectrum Theme: usual method to solve “headers already sent” error fails.

  • Resolved aloeroot


    Hi there folks. I’m trying to use the exec-php plugin to embed this redirect in a WordPress page:

    error_reporting (E_ALL);
    header( 'Location: ../../index.php' ) ;

    However I’m getting the dreaded Errors Already Sent warning:

    Warning: Cannot modify header information – headers already sent by (output started at /home/chubby/public_html/askchubbygirl/wp-content/themes/spectrum/header.php:6) in /home/chubby/public_html/askchubbygirl/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 5

    The entire contents of my header.php page is as follows. I’ve made a couple edits, namely adding the custom meta tags, adding the twittercode.php include at the bottom and hardcoding a URL to a different style sheet. I can’t find any issues with whitespace on line six of this file, though. Help please?:

     * @package WordPress
     * @subpackage Spectrum
     */?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns=""<?php language_attributes(); ?>>	<head profile="">
    		<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    		<title><?php wp_title('&laquo;', true, 'right'); ?><?php bloginfo('name'); ?></title>
    		<link rel="stylesheet" href="" type="text/css" media="screen" />
    		<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie.css" type="text/css" media="screen" />
    		<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
    		<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-min.js"></script>
    		<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/spectrum-min.js"></script>
    		<link rel="shortcut icon" href="favicon.ico" />
    		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    		<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    		<?php wp_head(); ?>
    		<meta name="keywords" content="amanda, nogle, mandee, chubby, girl, comics, comic, strip, comics by email, comics sherpa, belly dancing, fairchild, michaela, speech therapist, therapy center, animal rescue, dog trainer, counsellor, colourist, philosopher, physician, max, edmond, mrs myew, pets, belly dancing, work, office, exercise, workout" />
    <meta name="description" content="Official website for the Chubby Girl comic strip by ManDee Nogle." />
    	<body <?php body_class(); ?>>
    		<div id="header">
    			<div id="logo">
    					<a href="../index.php"><img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" /></a>
    			<div id="subscribe">
    				<a href="<?php bloginfo('rss2_url'); ?>" title="Subscribe to <?php bloginfo('name'); ?> RSS">Subscribe to <?php bloginfo('name'); ?> RSS</a>
    			<div class="pageList">
    					<?php wp_list_pages('title_li=&depth=1'); ?>
    		<div id="mainWrap">
    			<div id="main">
    				<div id="siteDescription">
    					<?php include "../twittercode.php"; ?></div>
    <div id="content">
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Spectrum Theme: usual method to solve “headers already sent” error fails.’ is closed to new replies.