Community Forums › Forums › Archived Forums › General Discussion › Please Help — "Cannot modify header information"
Tagged: code edited, php error
- This topic has 6 replies, 5 voices, and was last updated 9 years, 10 months ago by Susan.
-
AuthorPosts
-
March 15, 2014 at 10:05 am #95022Dowling22Member
I am using the sixteen-nine-pro theme and have recently encountered this issue when trying to access my WordPress dashboard.
This is the full error: Cannot modify header information - headers already sent by (output started at /home1/dowling1/public_html/wp-content/themes/sixteen-nine-pro/functions.php:2) in /home1/dowling1/public_html/wp-includes/pluggable.php on line 896
So I assume the error is on line 2 of the functions file in my theme file sixteen-nine-pro correct?
Well here is a sample of my code for that file:
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Set Localization (do not remove)
load_child_theme_textdomain( 'sixteen-nine', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'sixteen-nine' ) );See anything I might be missing?
Your help is very much appreciated.March 15, 2014 at 2:28 pm #95064devParticipantDid you mess with functions.php?
If not, I'll bet you added a plugin that has some bad code. Deactivate them one at a time and see if it gets fixed.
March 15, 2014 at 9:30 pm #95086Dowling22MemberI didn't go into function.php file and change anything. However I did post some code in the editor that was supposed to allow me to add buttons to my sidebar. However, I could still access my dashboard at the time.
I cannot access my dashboard at this time, so how can I deactivate the plugin?March 16, 2014 at 8:52 am #95137Genesis DeveloperMemberConnect the FTP and remove the respective plugin from wp-content/plugins folder
May 21, 2014 at 3:53 pm #106225Dowling22MemberOk so from my research it is stating that the error is on line 2 of the functions.php file. I have checked, and this is what my code looks like:
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Set Localization (do not remove)
load_child_theme_textdomain( 'sixteen-nine', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'sixteen-nine' ) );I have added ?> to the very end of the file and still no progress. 🙁
There are no spaces in the codeAny ideas?
May 21, 2014 at 11:25 pm #106263TomParticipantfrom my research it is stating that the error is on line 2 of the functions.php
I believe that this is incorrect. The code in functions.php stopped processing at line 2 because of another problem ....
I didn’t go into function.php file and change anything. However I did post some code in the editor that was supposed to allow me to add buttons to my sidebar.
This is the likely root of your problem. You edited/added code to a theme or plugin file in the editor. This has the same effect as downloading the file using FTP, changing the file and uploading the revised file to the server.
What file was the code added to? You should be able to edit this file by accessing it via FTP, for instance in functions.php, to remove your addition. Otherwise, if it is a plugin, you can deactivate/disable (or delete) the plugin via FTP, then login to your site (and delete the plugin if not yet done. You should also undo any other "fixes" you have attempted in the interim, such as adding "?>" to the end of a file where it was not previously.
Choose your next site design from over 350 Genesis themes.
[ Follow me: Twitter ] [ Follow Themes: Twitter ] [ My Favourite Webhost ]May 22, 2014 at 2:22 pm #106375SusanModeratorIt is stating that the error is here:
/home1/dowling1/public_html/wp-includes/pluggable.php on line 896
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.