Add blog layout options

This commit is contained in:
Alexander Agnarson 2021-01-28 16:10:35 +01:00
parent 843c7822de
commit b34776d661
11 changed files with 344 additions and 137 deletions

View file

@ -10,10 +10,30 @@
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ): the_post(); ?>
<?php get_template_part('content'); ?>
<?php endwhile; ?>
<?php if ( get_theme_mod('blog-layout','blog-standard') == 'blog-grid' ) : ?>
<div class="article-grid">
<?php while ( have_posts() ): the_post(); ?>
<?php get_template_part('content-grid'); ?>
<?php endwhile; ?>
</div>
<?php elseif ( get_theme_mod('blog-layout','blog-standard') == 'blog-list' ) : ?>
<div class="article-list">
<?php while ( have_posts() ): the_post(); ?>
<?php get_template_part('content-list'); ?>
<?php endwhile; ?>
</div>
<?php else: ?>
<?php while ( have_posts() ): the_post(); ?>
<?php get_template_part('content'); ?>
<?php endwhile; ?>
<?php endif; ?>
<?php get_template_part('inc/front-widgets-bottom'); ?>
<?php get_template_part('inc/pagination'); ?>