Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-14-2012, 03:25 PM   PM User | #1
kjetterman
New to the CF scene

 
Join Date: Oct 2008
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
kjetterman is an unknown quantity at this point
Question Parse Error / Syntax error

Hi all!

I am doing some custom page templates in Wordpress and came across a syntax error that I can't seem to find.

Here is the error: Parse error: syntax error, unexpected $end in /home/xxx/public_html/xxx/wp-content/themes/xxx/home.php on line 58

home.php:

PHP Code:
<?php

add_action
'genesis_meta''campaign_home_genesis_meta' );
/**
 * Add widget support for homepage. If no widgets active, display the default loop.
 *
 */
function campaign_home_genesis_meta() {

    if ( 
is_active_sidebar'twitter' ) || is_active_sidebar'issues' ) || is_active_sidebar'action' ) || is_active_sidebar'press' ) || is_active_sidebar'social-network' ) || is_active_sidebar'esign-up' ) ) {

        
remove_action'genesis_loop''genesis_do_loop' );
        
add_action'genesis_loop''campaign_home_loop_helper' );
        
add_filter'genesis_pre_get_option_site_layout''__genesis_return_full_width_content' );

    }
}

function 
campaign_home_loop_helper() {

    if ( 
is_active_sidebar'twitter' ) ) {
        echo 
'<div id="twitter"><div class="wrap">';
        
dynamic_sidebar'twitter' );
        echo 
'</div><!-- end .wrap --></div><!-- end .twitter -->';
    }

    if ( 
is_active_sidebar'issues' ) ) {
        echo 
'<div id="issues"><div class="wrap">';
        
dynamic_sidebar'issues' );
        echo 
'</div><!-- end .wrap --></div><!-- end .issues -->';
    }

    if ( 
is_active_sidebar'action' ) ) {
        echo 
'<div id="action"><div class="wrap">';
        
dynamic_sidebar'action' );
        echo 
'</div><!-- end .wrap --></div><!-- end .action -->';
    }

    if ( 
is_active_sidebar'press' ) ) {
        echo 
'<div id="press"><div class="wrap">';
        
dynamic_sidebar'press' );
        echo 
'</div><!-- end .wrap --></div><!-- end .press -->';
    }

[
B]/** ADDED THESE 2 ACTIVE SIDEBARS AND THAT IS WHAT THREW THE ERROR **/[/B]
    
    if ( 
is_active_sidebar'social-network' ) ) {
        echo 
'<body class="social">';
        
dynamic_sidebar'social-network' );
        echo 
'</div><!-- end .social -->';

    if ( 
is_active_sidebar'esign-up' ) ) {
        echo 
'<body class="signup">';
        
dynamic_sidebar'esign-up' );
        echo 
'</div><!-- end .signup -->';
    }

}

genesis();
From what I understand, a curly bracket could be missing (i'm not sure where though) or it doesn't like my body class= tags.

Any help I could get in solving this error would be so much appreciated! I have fixed everything I knew how to fix .... but just can't seem to find this one.

Last edited by kjetterman; 09-14-2012 at 03:43 PM..
kjetterman is offline   Reply With Quote
Old 09-14-2012, 03:46 PM   PM User | #2
kjetterman
New to the CF scene

 
Join Date: Oct 2008
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
kjetterman is an unknown quantity at this point
Nevermind! I figured this one out!! I was missing a curly bracket after my first registered sidebar code block (of the two that I added). Doh!!
kjetterman is offline   Reply With Quote
Old 09-14-2012, 08:01 PM   PM User | #3
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,521
Thanks: 45
Thanked 440 Times in 429 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
If you look in my signature, I have a link about this very issue which shows you how to identify this problem and fix it in the future.
__________________
Please wrap your code in [php] tags. It is a sticky topic and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:30 AM.


Advertisement
Log in to turn off these ads.