Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » Running WordPress » Installing & running WordPress »

[SOLVED] Syntax error in index.php


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Oct 20, 2011, 11:54 AM
Rebecka
 
3 posts · Oct 2011
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!

Last edited by Rebecka; Oct 20, 2011 at 12:01 PM.
  #2  
Old Oct 20, 2011, 12:24 PM
lmilesw's Avatar
lmilesw
 
10,082 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Oct 20, 2011, 12:53 PM
Rebecka
 
3 posts · Oct 2011
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?
  #4  
Old Oct 20, 2011, 01:03 PM
Rebecka
 
3 posts · Oct 2011
I figured it out! Thanks, again!

needed a ')' in the if statement

Last edited by juggledad; Oct 20, 2011 at 02:53 PM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help Parse error: syntax error, unexpected ';', expecting ')' in /home/content archiex Installing & running WordPress 2 Jul 6, 2011 07:58 PM
[SOLVED] ERROR MESSAGE: Parse error: syntax error, unexpected T_STRING in /hsphere/lo Candy Atahualpa 3 Wordpress theme 1 Oct 31, 2010 03:00 PM
Parse error: syntax error, unexpected '<' in /home6/jonesber/public_html/wp-content/ jonesberries Atahualpa 3 Wordpress theme 2 Nov 30, 2009 03:33 AM
[SOLVED] Home page won't load! Parse error, syntax error lhanft Atahualpa 3 Wordpress theme 4 Aug 30, 2009 01:44 PM
[SOLVED] Parse error: syntax error, unexpected ':', expecting ')' in /home/cwicsol/pu norwichkaren Page & Category Menu Bars 1 Jul 12, 2009 10:04 AM


All times are GMT -6. The time now is 10:13 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.