<?php $layout_opt = mnmd_bone_get_layout_opt(); $section_heading = mnmd_bone_get_option('latest_posts_heading', esc_html__( 'Latest Posts', 'bone' )); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; global $wp_query; ?> <?php get_header(); ?> <main id="main" class="layoutBody"> <?php if ( is_front_page() ) { ?> <h2 class="d-none"> <?php echo get_bloginfo( 'name' ); ?> - <?php wp_title(''); ?></h2> <?php } ?> <?php if ( is_home() && !is_paged() ) { $feat_layout = mnmd_bone_get_option('featured_posts_layout','slider'); $feat_template = ( strpos($feat_layout, '-') ) ? substr($feat_layout, 0, strpos($feat_layout, '-')) : $feat_layout; $fw_feat = ( ($feat_layout === 'slider-cover') || ($feat_layout === 'slider-fw') || ($feat_layout == 'carousel') ) ? true : false; get_template_part('templates/featured-'.$feat_template); } ?> <?php if (is_active_sidebar('adsidebar-1')) { ?> <div class="adSidebar adSidebar--1"> <div class="container"> <?php dynamic_sidebar('adsidebar-1'); ?> </div> </div> <?php } ?> <?php if ( $layout_opt['sidebar-position'] == 'none' ) { ?> <div class="contentBlockWrapper"> <div class="container"> <div class="layoutContent<?php echo esc_attr($layout_opt['main-class']); ?> clearfix"> <?php if ( is_home() && ( $section_heading !== '' ) ) { ?> <div class="sectionHeading"> <h3 class="sectionHeading-title h4 metaFont"> <?php echo wp_kses_post( $section_heading ); ?> <?php if ( $paged > 1) { esc_html_e(' - Page ', 'bone'); echo esc_html($paged); } ?> </h3> </div> <?php } ?> <?php if ( have_posts() ): ?> <div id="mdContent" class="<?php echo esc_attr($layout_opt['content-class']); ?> clearfix"> <?php while ( have_posts() ) : the_post(); mnmd_bone_get_template( $layout_opt['content-layout'] ); endwhile; ?> </div> <?php mnmd_bone_get_pagination( $layout_opt['pagination-type'] );?> <?php else: get_template_part('templates/no-result' ); ?> <?php endif; ?> </div> </div> </div><!-- contentBlockWrapper --> <?php } else { ?> <div class="contentBlockWrapper"> <div class="container"> <div class="layoutContent d-lg-flex"> <div class="layoutContent-main<?php echo esc_attr($layout_opt['main-class']); ?>"> <?php if ( is_home() && ( $section_heading !== '' ) ) { ?> <div class="sectionHeading"> <h3 class="sectionHeading-title h4 metaFont"> <?php echo esc_html( $section_heading ); ?> <?php if ( $paged > 1) { esc_html_e(' - Page ', 'bone'); echo esc_html($paged); } ?> </h3> </div> <?php } ?> <?php if ( have_posts() ): ?> <div id="mdContent" class="<?php echo esc_attr($layout_opt['content-class']); ?> clearfix"> <?php while ( have_posts() ) : the_post(); mnmd_bone_get_template( $layout_opt['content-layout'] ); endwhile; ?> </div> <?php mnmd_bone_get_pagination( $layout_opt['pagination-type'] );?> <?php else: get_template_part('templates/no-result' ); ?> <?php endif; ?> </div> <aside class="layoutContent-sidebar sidebar<?php echo esc_attr($layout_opt['sidebar-class']); ?>"> <?php get_sidebar(); ?> </aside> </div> </div> </div> <!-- contentBlockWrapper --> <?php } ?> <?php echo do_shortcode("[abc_pagination]"); ?> </main> <?php if (is_active_sidebar('adsidebar-2')) { ?> <div class="adSidebar adSidebar--2"> <div class="container"> <?php dynamic_sidebar('adsidebar-2'); ?> </div> </div> <?php } ?> <?php get_footer(); ?> <?php $more_reading_toggle = mnmd_bone_get_option('more_reading_toggle', 'yes'); if ( ( $more_reading_toggle === 'yes' ) && !is_paged() ) { get_template_part( 'templates/by-category-listing' ); } ?>