-1

im creating a wordpress blog and im having the following warning that keeps coming up,

Warning: Cannot modify header information - headers already sent by (output started at /home/content/66/7511066/html/zen/wp-content/themes/ZenOfficePortfolio/functions.php:20) in /home/content/66/7511066/html/zen/wp-includes/pluggable.php on line 934

when i tried this code locally on my machine, it worked fine. however when i moved the code over to the hosting website, i keep getting the error

my functions.php is as follows

<?php
    if(function_exists('register_sidebar')){
        register_sidebar(array('name' => 'ZenOffice'));
    } 

        add_filter('comments_template', 'legacy_comments');
    function legacy_comments($file) {
        if ( !function_exists('wp_list_comments') ) 
            $file = TEMPLATEPATH . '/old-comments.php';
        return $file;
    }

    //Set the theme categories
    define('BLOG',15);
    define('PORTFOLIO',14);
?>
c11ada
  • 4,302
  • 15
  • 48
  • 62
  • It seems you don't have the correct permissions to edit it on the hosting, I would try hosting on your local then re-upping. – Aaron Lee Oct 21 '11 at 10:08
  • 2
    You probably have a space or some other characters after the `?>`, leading white space to be output to the browser. Consider Googling the error message first next time - there are zillions of dupes of this on SO alone, and people tend to get downvote itchy when another one comes up :) – Pekka Oct 21 '11 at 10:10
  • @AaronLee? it's header already sent, he must have some output before headers are called – Damien Pirsy Oct 21 '11 at 10:10
  • 1
    @pekka I agree with you mate, I know exactly where this happens, on your header, you have the `?> – Val Oct 21 '11 at 10:13
  • There could be two possibilities, plugins and themes. Try switching them. – Riz Oct 21 '11 at 10:15

1 Answers1

0

I think iv solved it,

i just made sure there were no white spaces as @Pekka suggested. and then i re uploaded the file.

seems to be working now.

c11ada
  • 4,302
  • 15
  • 48
  • 62