Today I was playing around with the child theme (and even with the main theme) functions.php to manage to remove the website field in the comment form of my blog.
To do so I was using this function and I placed it in functions.php of the child theme:
function daniel_disable_comment_url($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields','daniel_disable_comment_url');
Once i press update i got this error:
Warning: Cannot modify header information - headers already sent by (output started at /home3/interns/public_html/wp-content/themes/salient-child/functions.php:17) in /home3/interns/public_html/wp-includes/pluggable.php on line 1174
So i decided to remove it and try to put it into the header file.
Again same error so I removed it again and tried to put it into the main theme function .php file, again the same error so I removed it from there too.
Finally I tried to manually delete the url field from comment.php in the main theme but again error and I went back again.
Now I noticed that no matter what I do, everytime I press something that requires the use of a function in the backend (such as deleting comments or updating files) i get always this error even if actually the thing works (post deleted ie)
Hello,
Today I was playing around with the child theme (and even with the main theme) functions.php to manage to remove the website field in the comment form of my blog.
To do so I was using this function and I placed it in functions.php of the child theme:
function daniel_disable_comment_url($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','daniel_disable_comment_url');
Once i press update i got this error:
Warning: Cannot modify header information - headers already sent by (output started at /home3/interns/public_html/wp-content/themes/salient-child/functions.php:17) in /home3/interns/public_html/wp-includes/pluggable.php on line 1174
So i decided to remove it and try to put it into the header file.
Again same error so I removed it again and tried to put it into the main theme function .php file, again the same error so I removed it from there too.
Finally I tried to manually delete the url field from comment.php in the main theme but again error and I went back again.
Now I noticed that no matter what I do, everytime I press something that requires the use of a function in the backend (such as deleting comments or updating files) i get always this error even if actually the thing works (post deleted ie)
How can I solve this?
Regards,
Daniel
I found myself the solution, was because of a white-space in the file after the closing php tag