-1

I transferred wordpress on my domain and when I try to login I get this error:

ERROR: Cookies are blocked due to unexpected output.

With this warnings:

Warning: Cannot modify header information - headers already sent by (output started at /customers/e/2/2/myurlsite.com/httpd.www/wp-content/themes/twentythirteen-child/functions.php:10) in /customers/e/2/2/myurlsite.com/httpd.www/wp-login.php on line 424 

Warning: Cannot modify header information - headers already sent by (output started at /customers/e/2/2/myurlsite.com/httpd.www/wp-content/themes/twentythirteen-child/functions.php:10) in /customers/e/2/2/myurlsite.com/httpd.www/wp-login.php on line 437

I understand that the problem is in my functions.php file, but I don't know how to solve it, because I don't know anything about php. Here's the function.php code at row 10

<?php

add_action( 'wp_enqueue_scripts', 'wpsites_google_fonts' );
function wpsites_google_fonts() {
wp_enqueue_style( 'gfonts', '//fonts.googleapis.com/css?family=Oswald|Open+Sans|Euphoria+Script|Cookie', array(), CHILD_THEME_VERSION );
}

?>

Can someone please tell me where the problem in this file is? Thanks

giulio maione
  • 45
  • 1
  • 6
  • Get rid of the closing tag `?>` – rnevius Feb 11 '15 at 12:23
  • Cannot modify header information means you are sending something before the cookie is being set. The cookie should be set before any other output is being rendered or printed or sent. Even a newline or space character in the file if php is embedded in html may cause this. – Sony Mathew Feb 11 '15 at 12:25

1 Answers1

0

Remove last ?> from funtion.php AND remove extra spaces if you used more than one <?php ?> Or add ob_start(); in start after <?php

parveen
  • 557
  • 3
  • 13