Archived topic
Keep getting error messages about theme-functions.php
5 replies · Started by Lola on February 11, 2018
Hello,
I keep getting error messages about the theme-functions.php
Warning: Cannot modify header information – headers already sent by (output started at /home1/mistresslola/public_html/wp-content/themes/generatepress/inc/theme-functions.php:1) in...
over the past hour it's been giving me lots of different files after that.
I think I may have broken the code when I inserted some I pulled from the net (stupid I know, lesson learned). I gained access again through FTP and deleted what I added, and now it keeps giving me this error :(
I've disabled all my plugin's through FTP (and only re-enabled the ones I need for my site to continue running whilst I figure this out, which were all running fine before my silly editing)
I'd be so grateful if you could have a look and see if you know what's causing this.
Hi there,
Best thing to do is replace the contents of that file with the default code: https://themes.svn.wordpress.org/generatepress/2.0.2/inc/theme-functions.php
Then use one of these methods to add your own PHP snippets: https://docs.generatepress.com/article/adding-php/
Let me know if this helps or not :)
Hello!
I updated that using FTP and now I'm getting these error messages when I try to log in:
Warning: Cannot modify header information - headers already sent by (output started at /home1/mistresslola/public_html/wp-content/themes/generatepress/inc/theme-functions.php:1) in /home1/mistresslola/public_html/wp-login.php on line 421
Warning: Cannot modify header information - headers already sent by (output started at /home1/mistresslola/public_html/wp-content/themes/generatepress/inc/theme-functions.php:1) in /home1/mistresslola/public_html/wp-login.php on line 434
Warning: Cannot modify header information - headers already sent by (output started at /home1/mistresslola/public_html/wp-content/themes/generatepress/inc/theme-functions.php:1) in /home1/mistresslola/public_html/wp-includes/pluggable.php on line 920
Warning: Cannot modify header information - headers already sent by (output started at /home1/mistresslola/public_html/wp-content/themes/generatepress/inc/theme-functions.php:1) in /home1/mistresslola/public_html/wp-includes/pluggable.php on line 921
Warning: Cannot modify header information - headers already sent by (output started at /home1/mistresslola/public_html/wp-content/themes/generatepress/inc/theme-functions.php:1) in /home1/mistresslola/public_html/wp-includes/pluggable.php on line 922
It may be a good idea to re-upload all of the theme files via FTP, in case anything else was changed in there.
Seems to have done the trick, thanks!
No problem! :)