I am getting this error, when I am doing


Warning: Cannot modify header information - headers already sent by (output started at /home/mytheme/public_html/wp-content/themes/mytheme/functions.php:1) in /home/mytheme/public_html/wp-includes/pluggable.php on line 899

some code here

if ( ! isset( $content_width ) )
    $content_width = 604;

 * Add support for a custom header image.
require get_template_directory() . '/inc/custom-header.php';

 * Twenty Thirteen only works in WordPress 3.6 or later.
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
    require get_template_directory() . '/inc/back-compat.php';

 * Twenty Thirteen setup.
 * Sets up theme defaults and registers the various WordPress features that
 * Twenty Thirteen supports.
 * @uses load_theme_textdomain() For translation/localization support.
 * @uses add_editor_style() To add Visual Editor stylesheets.
 * @uses add_theme_support() To add support for automatic feed links, post
 * formats, and post thumbnails.
 * @uses register_nav_menu() To add support for a navigation menu.
 * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
 * @since Twenty Thirteen 1.0
 * @return void

Any idea. Also i checked there is no empty space around

  • 1
    Paste first 20 lines of codes from functions.php – Robert hue Sep 27 '14 at 11:31
  • @Roberthue : i added the code – Hitu Bansal Sep 27 '14 at 11:34

There is a FAQ Troubleshooting entry How do I solve the Headers already sent warning problem? dedicated to this. You should check your wp-config.php, because there might possibly be some white-spaces - spaces, new lines or so - causing the message. Although the message you posted indicates the problem lies in line 1 of you functions.php. Redirects are a typical candidate for the Headers already sent warning too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.