Parse error help...

uditbhansali

Regular Member
Joined
Aug 16, 2010
Messages
488
Reaction score
292
I'm getting this error and I can't find the problem.
Can anyone help me pls

Here's the error.

Parse error: syntax error, unexpected $end in /home/folder/public_html/shalco/wp-content/themes/levitation/sidebar.php on line 12

Here's the code:

Code:
<div class='boxxed boxxed_small boxxed3' id='sidebar' >
  <div class="widget widget_pages">
<?php if ( is_page(array('2'))) { ?>
<div class="e-left">
<h3>E-Brochure</h3>
<a href="http://shalco.in/SHALCO-Brochure.pdf" onclick="target='_blank'"><img src="http://shalco.in/images/Brochure.jpg" alt="E Brochure" /></a>
</div>
<div class="i-left">
<h3>ISO Certified</h3>
<a href="http://shalco.in/SHALCO-ISO.pdf" onclick="target='_blank'"><img src="http://shalco.in/images/SHALCO-ISO.jpg" alt="ISO Certification" /></a>
</div>
</div><!-- end sidebar -->
 
Where is your ending curly bracket for <?php if ( is_page(array('2'))) { ?> ?

Next ones are not a reason for parse error, but you should use " instead of ' on tag syntax like: id='sidebar'

also onclick="target='_blank'" seems pretty strange?
 
Try adding
PHP:
<?php } ?>
at the end.
 
exactly what jazzc said

you have an opening brace:

Code:
<?php if ( is_page(array('2'))) { ?>
but no close brace for your statement
 
Back
Top