> $section ) : if ( empty( $section[ 'sortitem_hide' ] ) ): // Set section type / context $context = ( strpos( $key, 'area_' ) === 0 ) ? str_replace( 'area_', '', $key ) : ''; if ( ! empty( $context ) ) $type = 'widgetarea'; elseif ( $key == 'content' ) $type = ( is_home() ) ? 'content-blog' : 'content-page'; else $type = $key; $type = apply_filters( 'hoot_frontpage_sections_switch', $type, $key, $sections ); // Exit the loop except main content for a paged post list (blog) if ( $type != 'content-blog' && apply_filters( 'hoot_fpg_paged_hidemodules', is_paged() ) ) continue; // Set section background $module_bg = hoot_get_mod( "frontpage_sectionbg_{$key}-type" ); $module_bg = ( empty( $module_bg ) ) ? 'none' : $module_bg; $background_class = 'module-bg-' . $module_bg; $background_class .= ( $module_bg == 'highlight' ) ? ' area-highlight' : ''; // Allow child themes to have templates $custom_template = hybridextend_get_template_part( 'front-page-' . $key, $context ); if ( $custom_template ): include( $custom_template ); else: switch( $type ): // Display Widget Areas case 'widgetarea': $areakey = 'area_' . $context; $section['columns'] = isset( $section['columns'] ) ? $section['columns'] : '100'; $structure = hoot_col_width_to_span( $section['columns'] ); $count = count( $structure ); $displayarea = false; for ( $c = 1; $c <= $count ; $c++ ) { if ( is_active_sidebar( "hoot-frontpage-{$areakey}_{$c}" ) ) { $displayarea = true; break; } } if ( $displayarea ) : ?>
>
>

' . wp_kses_post( $section['title'] ) . '

'; ?>
'; // Template modification Hook do_action( 'hoot_loop_start', 'frontpage.php' ); while ( have_posts() ) : the_post(); // Loads the template-parts/content-{$post_type}.php template. hybridextend_get_content_template(); endwhile; // Template modification Hook do_action( 'hoot_loop_end', 'frontpage.php' ); echo '
'; // Loads the template-parts/loop-nav.php template. get_template_part( 'template-parts/loop-nav' ); else : // Loads the template-parts/error.php template. get_template_part( 'template-parts/error' ); endif; ?>
>

' . wp_kses_post( $section['title'] ) . '

'; ?>
slider = array(); $hoot_theme->sliderSettings = array( 'class' => 'fpg-slider', 'min_height' => intval( hoot_get_mod( 'wt_html_slider_min_height' ) ), ); /* Create slider object */ foreach ( $slides as $slide ) { if ( !empty( $slide['image'] ) || !empty( $slide['content'] ) || !empty( $slide['url'] ) ) { $hoot_theme->slider[] = $slide; } } /* Display Slider Template */ get_template_part( 'template-parts/slider-html' ); endif; } $slider_html = ob_get_clean(); if ( !empty( $slider_html ) ) : ?>
>
slider = array(); $hoot_theme->sliderSettings = array( 'class' => 'fpg-slider' ); /* Create slider object */ foreach ( $slides as $slide ) { if ( !empty( $slide['image'] ) ) { $hoot_theme->slider[] = $slide; } } /* Display Slider Template */ get_template_part( 'template-parts/slider-image' ); endif; } $slider_img = ob_get_clean(); if ( !empty( $slider_img ) ) : ?>
>