PHP file corrupting entire theme

  • In Progress
    Posted in: Aegaeus WP Theme  
  • Customer
    Champlain Media
    August 28, 2014 at 4:11 pm #9460

    Hello,

    I’m working on setting up a staging site for thebestguitarlessons.com. I run Aegaeus theme on that website and it works just fine. However, when setting up my staging site the theme won’t work. Everything works fine when I switch to a default WP theme but part of the changes I am trying to make in staging server are with theme layouts.

    When trying to access I get the following error:

    Warning: Invalid argument supplied for foreach() in ..../staging/wp-content/themes/AegaeusWP/includes/theme-widget-areas.php on line 51

    And here are the final few lines of PHP on the theme-widget-areas file starting on line 49…

    if( !empty( $dynamic_sidebar ) )
    {
    	foreach ( $dynamic_sidebar as $sidebar )
    	{
    		if ( function_exists( 'register_sidebar' ) )
    	    register_sidebar( array(
    			'name' => $sidebar['title'],
    			'description'   => __('This is an area for widgets.','hbthemes'),
    			'before_widget' => '<div id="%1$s" class="widget-item clearfix %2$s">',
    			'after_widget'  => '</div>',
    			'before_title'  => '<h4>',
    			'after_title'   => '</h4>'
    			)
    		);
    	}
    }
    ?>

    The above error appears when trying to visit the staging site. It simply displays my background color and that error, no other content. However, within my admin control panel there are 3 errors across the top, one is the above error.. And here is the next..

    Warning: Invalid argument supplied for foreach() in /..../staging/wp-content/themes/AegaeusWP/includes/theme-metabox-usage.php on line 31

    Lines 24-37 of theme-metabox-usage php file…

    // Grab Sliders
    $flex_sliders = array();
    $temp_sliders = array();
    $flex_sliders[] = "None";
    if ( isset ( $data["hb_flex_slider"] ) ) 
    	$temp_sliders = $data["hb_flex_slider"];
    if (isset($temp_sliders)) {
    	foreach ($temp_sliders as $temp_slider) {
    		$flex_sliders[] = $temp_slider["title"];
    	}
    }
    
    $revolutionslider = array();
    $revolutionslider[''] = 'No Slider';

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.