[SOLVED] Syntax error in index.php
Hello -
I am new to php and was looking at the main index template (index.php). I must have done something wrong because now I am getting the following message when I try to go to my website: Parse error: syntax error, unexpected '{' in /home2/rainmake/public_html/Theatre4/wp-content/themes/atahualpa332/index.php on line 148. 1. How do I count the lines to find line 148? 2. And can I then post the code for help to find the error? Thank you! |
There are editors that show line numbers. So if you download the index.php from the atahualpa332 directory and open in the editor it looks like you will see a left curly brace that shouldn't be there.
You could also upgrade using the manual method as outlined here since you are at such an old version I am not sure you can still get a new copy of the index.php file to upload which would also fix the issue. You MAY have some issues with an upgrade as well because of changes in the code so I would look through some posts about upgrading from older versons. A backup is highly recommended especially because of version of Atahualp being that old. |
Thank you for responding so quickly! I'm hoping you might be able to help further and correct the code. I put the file into an editor, and found line 148. It is:
if( !is_single() AND !is_page() { >? Again, thank you. I have a lot to learn! (just in case, below is complete section with line 148) <!-- Post Headline --> <div class="post-headline"> <h2><?php if( !is_single() AND !is_page() { >? <a href="<?php the permalink() ? >" rel="bookmark" title="Permanent Link to <?php if (function_exists ('the_title_attribute')) { the_title_attribute(); } elseif (function_exists('the_title')) { the_title(); } ?>"><?php } the_title(); if( !is_single() AND !is_page() ) { ?> </a><?php } ?> </h2> </div? |
I figured it out! Thanks, again!:)
needed a ')' in the if statement |
All times are GMT -6. The time now is 05:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.