'banner-slider', 'option' => true, 'category' => '', 'count' => 6, 'dateOption' => true, 'commentOption' => true ) ) ) ); if( ! $frontpage_top_full_width_blocks ) { return; } $decoded_blocks = json_decode( $frontpage_top_full_width_blocks ); if( ! in_array( true, array_column( $decoded_blocks, 'option' ) ) ) { return; } echo '
'; foreach( $decoded_blocks as $block ) : $option = $block->option; if( $option ) { $block_name = $block->name; if( isset( $block->layout ) ) { $layout = $block->layout; } else { $layout = 'one'; if( $block_name === "banner-slider" ) $layout = 'four'; } get_template_part( 'template-parts/' .$block_name. '/layout', $layout, $block ); } endforeach; echo '
'; } endif; if( !function_exists( 'armonia_top_about_author__sec' ) ) : /** * About Author Section * */ function armonia_top_about_author__sec() { $about_author_section_option = get_theme_mod( 'about_author_section_option', true ); if( ! $about_author_section_option ) { return; } $frontpage_about_author_title = get_theme_mod( 'frontpage_about_author_title', esc_html__( 'Talking about me. I am a blogger.', 'armonia' ) ); $frontpage_about_author_desc = get_theme_mod( 'frontpage_about_author_desc' ); $frontpage_about_author_signature_image = get_theme_mod( 'frontpage_about_author_signature_image', esc_url( get_template_directory_uri() . '/assets/images/signature.png' ) ); $frontpage_about_author_image = get_theme_mod( 'frontpage_about_author_image', esc_url( get_template_directory_uri() . '/assets/images/author.jpg' ) ); ?>
' .esc_html( $frontpage_about_author_title ). ''; if( !empty( $frontpage_about_author_desc ) ) echo '

' .wp_kses_post( $frontpage_about_author_desc ). '

'; ?>
'; echo ''; echo ''; if( !empty( $frontpage_about_author_signature_image ) ) echo ''; ?>
'posts-grid', 'option' => true, 'blockTitle'=> esc_html__( 'Latest posts', 'armonia' ), 'category' => '', 'count' => 4, 'excerptOption'=> true, 'dateOption' => true, 'commentOption' => true, 'buttonOption' => true, 'layout' => 'seven' ), array( 'name' => 'categories-collection', 'option' => false, 'blockTitle'=> esc_html__( 'Categories Collection', 'armonia' ), 'categories' => '[]', 'count' => 4, 'countOption' => true, 'titleOption' => true ) ) ) ); if( ! $frontpage_middle_left_content_blocks ) { return; } $decoded_blocks = json_decode( $frontpage_middle_left_content_blocks ); if( ! in_array( true, array_column( $decoded_blocks, 'option' ) ) ) { return; } echo '
'; echo '
'; echo '
'; foreach( $decoded_blocks as $block ) : $option = $block->option; if( $option ) { $block_name = $block->name; if( isset( $block->layout ) ) { $layout = $block->layout; } else { $layout = 'one'; if( $block_name === "banner-slider" ) $layout = 'four'; } get_template_part( 'template-parts/' .$block_name. '/layout', $layout, $block ); } endforeach; echo '
'; echo '
'; if( is_active_sidebar( 'frontpage-middle-right-sidebar' ) ) : dynamic_sidebar( 'frontpage-middle-right-sidebar' ); else : the_widget( 'WP_Widget_Recent_Posts' ); ?>

    'count', 'order' => 'DESC', 'title_li' => '', 'number' => 6, ) ); ?>
'; echo ''; // row end echo '
'; } endif; if( ! function_exists( 'armonia_middle_right_content_sec' ) ) : /** * Middle Right Content Section * */ function armonia_middle_right_content_sec() { $frontpage_middle_right_content_blocks = get_theme_mod( 'frontpage_middle_right_content_blocks', json_encode(array( array( 'name' => 'posts-list', 'option' => false, 'blockTitle'=> esc_html__( 'Posts List', 'armonia' ), 'category' => '', 'count' => 4, 'excerptOption'=> true, 'dateOption' => true, 'commentOption' => true, 'buttonOption' => false ), array( 'name' => 'categories-collection', 'option' => false, 'blockTitle'=> esc_html__( 'Categories Collection', 'armonia' ), 'categories' => '[]', 'count' => 4, 'countOption' => true, 'titleOption' => true ) ) ) ); if( ! $frontpage_middle_right_content_blocks ) { return; } $decoded_blocks = json_decode( $frontpage_middle_right_content_blocks ); if( ! in_array( true, array_column( $decoded_blocks, 'option' ) ) ) { return; } echo '
'; echo '
'; echo '
'; foreach( $decoded_blocks as $block ) : $option = $block->option; if( $option ) { $block_name = $block->name; $layout = 'one'; if( $block_name === "banner-slider" ) $layout = 'four'; if( $block_name === "posts-grid" ) $layout = 'seven'; get_template_part( 'template-parts/' .$block_name. '/layout', $layout, $block ); } endforeach; echo '
'; echo '
'; if( is_active_sidebar( 'frontpage-middle-left-sidebar' ) ) : dynamic_sidebar( 'frontpage-middle-left-sidebar' ); else : the_widget( 'WP_Widget_Recent_Posts' ); ?>

    'count', 'order' => 'DESC', 'title_li' => '', 'number' => 6, ) ); ?>
'; echo '
'; echo '
'; } endif; if( ! function_exists( 'armonia_bottom_full_width_sec' ) ) : /** * Bottom Full Width Section * */ function armonia_bottom_full_width_sec() { $frontpage_bottom_full_width_blocks = get_theme_mod( 'frontpage_bottom_full_width_blocks', json_encode(array( array( 'name' => 'posts-list', 'option' => true, 'blockTitle'=> esc_html__( 'You may have missed', 'armonia' ), 'category' => '', 'count' => 4, 'excerptOption'=> true, 'dateOption' => true, 'commentOption' => true, 'buttonOption' => false ), array( 'name' => 'posts-grid', 'option' => false, 'blockTitle'=> esc_html__( 'Posts Grid', 'armonia' ), 'category' => '', 'count' => 4, 'excerptOption'=> true, 'dateOption' => true, 'commentOption' => true, 'buttonOption' => true, 'layout' => 'one' ) ) ) ); if( ! $frontpage_bottom_full_width_blocks ) { return; } $decoded_blocks = json_decode( $frontpage_bottom_full_width_blocks ); if( ! in_array( true, array_column( $decoded_blocks, 'option' ) ) ) { return; } echo '
'; foreach( $decoded_blocks as $block ) : $option = $block->option; if( $option ) { $block_name = $block->name; if( isset( $block->layout ) ) { $layout = $block->layout; } else { $layout = 'one'; if( $block_name === "banner-slider" ) $layout = 'four'; } get_template_part( 'template-parts/' .$block_name. '/layout', $layout, $block ); } endforeach; echo '
'; } endif; if( ! function_exists( 'armonia_bottom_full_width_woocommerce_sec' ) ) : /** * Bottom Full Width Woocommerce Section * */ function armonia_bottom_full_width_woocommerce_sec() { if( ! class_exists( 'WooCommerce' ) ) return; $frontpage_bottom_full_width_woocommerce_blocks = get_theme_mod( 'frontpage_bottom_full_width_woocommerce_blocks', json_encode(array( array( 'name' => 'woo-products', 'option' => true, 'blockTitle'=> esc_html__( 'Latest Products', 'armonia' ), 'productType' => 'latest', 'categories' => '[]', 'count' => 4 ) ) ) ); if( ! $frontpage_bottom_full_width_woocommerce_blocks ) { return; } $decoded_blocks = json_decode( $frontpage_bottom_full_width_woocommerce_blocks ); if( ! in_array( true, array_column( $decoded_blocks, 'option' ) ) ) { return; } echo '
'; foreach( $decoded_blocks as $block ) : $option = $block->option; if( $option ) { $block_name = $block->name; if( isset( $block->layout ) ) { $layout = $block->layout; } else { $layout = 'one'; if( $block_name === "banner-slider" ) $layout = 'four'; } get_template_part( 'template-parts/' .$block_name. '/layout', $layout, $block ); } endforeach; echo '
'; } endif; add_action( 'armonia_frontpage_section_hook', 'armonia_top_full_width_sec', 10 ); add_action( 'armonia_frontpage_section_hook', 'armonia_top_about_author__sec', 10 ); add_action( 'armonia_frontpage_section_hook', 'armonia_middle_left_content_sec', 20 ); add_action( 'armonia_frontpage_section_hook', 'armonia_middle_right_content_sec', 30 ); add_action( 'armonia_frontpage_section_hook', 'armonia_bottom_full_width_woocommerce_sec', 40 ); add_action( 'armonia_frontpage_section_hook', 'armonia_bottom_full_width_sec', 50 ); if( ! function_exists( 'armonia_footer_three_column_sec' ) ) : /** * Footer three column section fnc * */ function armonia_footer_three_column_sec() { if( ! is_front_page() ) { return; } $footer_three_column_blocks = get_theme_mod( 'footer_three_column_blocks', json_encode(array( array( 'label'=> esc_html__( 'Column One', 'armonia' ), 'name' => 'posts-column', 'category' => '', 'dateOption' => true, 'layout' => 'one' ), array( 'label'=> esc_html__( 'Column Two', 'armonia' ), 'name' => 'posts-column', 'category' => '', 'dateOption' => true, 'layout' => 'two' ), array( 'label'=> esc_html__( 'Column Three', 'armonia' ), 'name' => 'posts-column', 'category' => '', 'dateOption' => true, 'layout' => 'three' ) ) ) ); if( ! $footer_three_column_blocks ) { return; } echo ''; } endif; add_action( 'armonia_before_footer_hook', 'armonia_footer_three_column_sec', 40 );