Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Need help with Parse error: syntax error

    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?

  • #2
    New Coder
    Join Date
    Nov 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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.

  • #3
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,760
    Thanks
    41
    Thanked 191 Times in 190 Posts
    Quote Originally Posted by Kila View Post
    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 it may/should tell you what is going on

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • Users who have thanked alykins for this post:

    Kila (07-06-2011)

  • #4
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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
    }
    }
    ?>

  • #5
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,760
    Thanks
    41
    Thanked 191 Times in 190 Posts
    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

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • Users who have thanked alykins for this post:

    Kila (07-06-2011)

  • #6
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thank you alykins! I have no idea what's going on either. LOL I'll contact a moderator.

  • #7
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Code:
    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) { <?
    This is the issue. Please post in the correct forum in future.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •