Cannot modify header information

October 17, 2017 133 views
WordPress Ubuntu 16.04

Hi everyone,

I keep getting this error:
Warning: Cannot modify header information - headers already sent by (output started at /custom_functions.php:1) in /wp-includes/option.php on line 837

Warning: Cannot modify header information - headers already sent by (output started at /custom_functions.php:1) in /wp-includes/option.php on line 838

Now, I checked my custom-function file, especially line 1 and can't find anything.

Here it is:

<?php
/* ######################### Begin Registering Custom Widgets ######################### */
// Register the After Single Post widget to display 3 related posts
genesis_register_sidebar( array(
    'id' => 'after-single-post',
    'name' => 'After Single Post',
    'description' => 'Latest 3 posts after comments',
) );
// Register "Top Parallax" widget
genesis_register_sidebar( array(
    'id' => 'top-parallax',
    'name' => __( 'Top Parallax', 'mp' ),
    'description' => __( 'Top Parallax Widget.', 'mp' ),
) );
// Register "About" widget
genesis_register_sidebar( array(

Note: Since my file is long, I just pasted the first few lines.

I would appreciate any help.
Note: I can still access my backend and work. But the warning is displayed on top of every page I access.

Frond-end is fine.

This also caused the issue of not being able to login from site.com/wp-admin (which I used to be able to do). When I access this page, it gives me this warning on an otherwise totally white screen:

Warning: Cannot modify header information - headers already sent by (output started at /custom_functions.php:1)
in /wp-includes/pluggable.php on line 1210

Thanks in advance.

Be the first one to answer this question.