File: /www/wwwroot/www.molinta.com/wp-content/themes/medical-store/index.php
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Medical Store
*/
get_header(); ?>
<div class="header-image-box text-center">
<div class="container">
<?php if ( get_theme_mod('medical_store_header_page_title' , true)) : ?>
<h1 class="mb-0"><?php esc_html_e('Blog','medical-store'); ?></h1>
<?php endif; ?>
</div>
</div>
<div id="content" class="mt-5">
<div class="container">
<?php $medical_store_post_layout = get_theme_mod( 'medical_store_post_layout','Right Sidebar');
if($medical_store_post_layout == 'Right Sidebar'): ?>
<div class="row">
<div class="col-lg-8 col-md-8">
<div class="row">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content' );
endwhile;
else:
get_template_part( 'no-results' );
endif;
get_template_part( 'template-parts/pagination' );
?>
</div>
</div>
<div class="col-lg-4 col-md-4">
<?php get_sidebar(); ?>
</div>
</div>
<?php elseif ($medical_store_post_layout == 'Left Sidebar') : ?>
<div class="row">
<div class="col-lg-4 col-md-4">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-8 col-md-8">
<div class="row">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content' );
endwhile;
else:
get_template_part( 'no-results' );
endif;
get_template_part( 'template-parts/pagination' );
?>
</div>
</div>
</div>
<?php elseif ($medical_store_post_layout == 'One Column') : ?>
<div class="row">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content' );
endwhile;
else:
get_template_part( 'no-results' );
endif;
get_template_part( 'template-parts/pagination' );
?>
</div>
<?php elseif ($medical_store_post_layout == 'Three Columns') : ?>
<div class="row">
<div class="col-lg-4 col-md-4">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-4 col-md-4">
<div class="row">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content' );
endwhile;
else:
get_template_part( 'no-results' );
endif;
get_template_part( 'template-parts/pagination' );
?>
</div>
</div>
<div class="col-lg-4 col-md-4">
<div class="sidebar-area">
<?php
dynamic_sidebar('sidebar-2');
?>
</div>
</div>
</div>
<?php elseif ($medical_store_post_layout == 'Four Columns') : ?>
<div class="row">
<div class="col-lg-3 col-md-3">
<?php get_sidebar(); ?>
</div>
<div class="col-lg-3 col-md-3">
<div class="row">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content' );
endwhile;
else:
get_template_part( 'no-results' );
endif;
get_template_part( 'template-parts/pagination' );
?>
</div>
</div>
<div class="col-lg-3 col-md-3">
<div class="sidebar-area">
<?php
dynamic_sidebar('sidebar-2');
?>
</div>
</div>
<div class="col-lg-3 col-md-3">
<div class="sidebar-area sidebar-three">
<?php
dynamic_sidebar('sidebar-3');
?>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>