...

View Full Version : Need help with Parse error: syntax error



Kila
07-06-2011, 02:31 PM
Hi, I'm completely new to website design and therefore don't know much about coding (or anything at all for that matter) :)

On my website, I'm getting this error:

Parse error: syntax error, unexpected '<' in /home/content/69/7090169/html/wp-content/themes/weaver/sidebar.php on line 15

I have no idea how to fix it. Is there anyone that can please help me resolve this?

-Karl-
07-06-2011, 02:35 PM
This is a PHP error.

It appears in sidebar.php, you had an extra "<" that shouldn't be there, on line 15. Best bet is to open the file and take a look.

alykins
07-06-2011, 02:37 PM
Hi, I'm completely new to website design and therefore don't know much about coding (or anything at all for that matter) :)

On my website, I'm getting this error:

Parse error: syntax error, unexpected '<' in /home/content/69/7090169/html/wp-content/themes/weaver/sidebar.php on line 15

I have no idea how to fix it. Is there anyone that can please help me resolve this?

what that is saying is that as the browser tried to compile it threw an error... can you post code? also (as a preemptive maneuver) run your code through the validator (http://validator.w3.org/) it may/should tell you what is going on

Kila
07-06-2011, 02:44 PM
Thank you both for the quick response. Here is the code from my page:


<?php
/**
* The Sidebar containing the primary and secondary widget areas. *<?php
<?php weaver_put_area('presidebar');if (!weaver_is_checked_page_opt('hide-primary-widget-area') && !weaver_replace_primary()) {?>
<div id="primary" class="widget-area" role="complementary">
<ul class="xoxo"
<?php


/* When we call the dynamic_sidebar() function, it'll spit out
* the widgets for that widget area. If it instead returns false,
* then the sidebar simply doesn't exist, so we'll hard-code in
* some default sidebar stuff just in case.
*/
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) { <?
<li id="meta" class="widget-container">
<h3 class="widget-title"><?php _e( 'Primary Widget Area', WEAVER_TRANS )); ?></h3>
<ul>


<?php _e("This theme has been designed to be used with sidebars. This message will no
longer be displayed after you add at least one widget to the Primary Widget Area
using the Appearance->Widgets control panel.",WEAVER_TRANS); ?>
<li><?php wp_loginout(); ?></li>
</ul>
</li>

<?php } // end primary widget area ?>
</ul>
</div><!-- #primary .widget-area -->
<?php
}

/* now the secondary area */
if (!weaver_is_checked_page_opt('hide-secondary-widget-area')&& !weaver_replace_secondary()) {
// The Secondary Widget Area
if ( is_active_sidebar( 'secondary-widget-area' ) ) { ?>
<div id="secondary" class="widget-area" role="complementary">
<ul class="xoxo">
<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
</ul>
</div><!-- #secondary .widget-area -->
<?php
}
}
?>

alykins
07-06-2011, 03:45 PM
unfortunately i do asp not php and have no clue what is going on lol; i just know what the browser was telling you... either way im 90% sure this is not a html/css issue; i would PM a moderator to move this thread to php side of forum... im not well versed in php syntax so i don;t want to steer you wrong :thumbsup:

Kila
07-06-2011, 04:05 PM
Thank you alykins! I have no idea what's going on either. LOL :) I'll contact a moderator.

Apostropartheid
07-07-2011, 01:18 PM
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) { <?

This is the issue. Please post in the correct forum in future.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum