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.