I have created and edit the templates for my WordPress blog long enough to come across a few confusing errors. While I have had good success solving many of the errors fairly quickly, there is one that has continuously come up, and caused my blog from loading.
Recently, however, I managed to find the cause of this common error, and since then have quickly corrected any problems that have caused the error. This post explains the error, and how I solved the problem.
The Error
Sometimes when I edit my WordPress template files, I receive the following error message when I attempt to view my blog:
The text in italics is dynamic and is different depending on the files and line numbers that caused the error.
For someone like me, who isn’t very fluent in PHP, errrors such as this are very cryptic. At least the error message did mention two files that I could look into to see if I could find the problem.
The Solution
The first thing I did was look into the first file specified by the error message. I slowly looked through the file, looking for anything that didn’t look right. Nothing in the code jumped out at me as being wrong. I then closed the file and looked for the second file specified in the message.
The second file, however, was a WordPress file as I had been editing my template in WordPress. Realizing that the WordPress file was probably not the cause of the problem, or I would have had the error once I upgraded, I re-opened the original file.
After reviewing the contents of the file a second time, I thought maybe some strange characters were embedded in the file. I double-checked the spaces and carriage returns, and then saved the file.
The error still came up in the web browser. I went back to the file and removed all lines and characters from the end of the file (below the ‘?>’ tag), and then resaved the file. After doing that last step, the pages to my blog were displayed again without any problems.
If you experience the same error, check to ensure you don’t have any strange characters after the ‘?>’ tag at the bottom of a file.







on June 27, 2010 at 2:49 am
never happened to me but thanks for heads up…
on July 6, 2010 at 10:43 pm
I limp along with my WP blog, doing most things right, but one thing I don’t like and don’t know how to fix is how to get rid of the extra blog name line below my tabs. I know enough to back up my blog before doing anything, but I don’t know which section in the places to edit the the blog (header, index, etc.) holds the code for the part I want to eliminate. Even WP for Dummies is no help! LOL I don’t want you to solve my problem for me, but maybe do an article about it?
on July 8, 2010 at 10:30 pm
It looks like it appears on all your pages so chances are it is in one of the more common files. Try looking in the header.php file of your theme. More specifically, you should be look for a line that contains:
<div id=”header”><h1><a href=”http://ipentimento.com” title=”iPentimento | Genealogy and History home page”>iPentimento | Genealogy and History</a></h1></div>
on July 13, 2010 at 10:01 pm
I remember when I first saw that error I didn’t know what the heck was going on. Took me forever to realize it was an empty line after the ?> that was causing it. BTW, just came here after reading on WB you no longer use fluid widths. I absolutely LOVE this design. It’s my favorite TE look thus far. Nice job!
Twitter: 2createawebsite
on July 14, 2010 at 8:17 am
Thanks Lisa. I visited a number of blogs to see what I like before designing the template. I learned a bit more about WordPress when I designed this one, but there is still some more work to do.