sparklogix
Member
Posted 2 years ago #
I just created my first custom template and when I go to preview it on WP, I get the following error:
Parse error: syntax error, unexpected $end in D:\Hosting\2542608\html\bensonreport\wordpress\wp-content\themes\BensonReport\header.php on line 25
The last few lines of the code in that file are:
<?php wp_head(); ?>
</head>
<body>
<div id="background">
<div id="header">
<div id="posts">
What does this mean and how can I fix it?
What is on line 25 of your header?
Open it with something like Notepad++ if you don't already have a way to find the line number.
A missed end brace "}", bracket "]", or parenthesis ")" can also cause
the unexpected $end in a script as well. (link)
Other google joy
sparklogix
Member
Posted 2 years ago #
The last line of the header.php file is what I posted in the code above.
<div id="posts">
That's how the php file ends. I was modifying this from a different theme that works perfectly and ends the same way.
I didn't ask how the file ended.
I asked what was on line 25.
In this case "$end" does NOT mean "end of your page."
In this case, if you had read any of the links I provided you with, "$end" error means... *drumroll*
A missed end brace "}", bracket "]", or parenthesis ")" can also cause
the unexpected $end in a script as well. (link)
So go make sure you didn't accidentally delete one of your curly brackets or parentheses from the theme.