2016-11-17 21:18:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template for displaying all pages.
|
|
|
|
*
|
|
|
|
* This is the template that displays all pages by default.
|
|
|
|
* Please note that this is the WordPress construct of pages
|
|
|
|
* and that other 'pages' on your WordPress site will use a
|
|
|
|
* different template.
|
|
|
|
*
|
|
|
|
* @package understrap
|
|
|
|
*/
|
|
|
|
|
|
|
|
get_header();
|
|
|
|
|
2016-11-21 09:22:50 +00:00
|
|
|
|
|
|
|
$container = get_theme_mod('understrap_container_type');
|
|
|
|
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|
|
|
$posts_style = get_theme_mod( 'understrap_posts_index_style' );
|
|
|
|
|
|
|
|
if ( is_front_page() && is_home() ) {
|
|
|
|
get_sidebar('hero');
|
|
|
|
|
|
|
|
get_sidebar('statichero');
|
|
|
|
} else {
|
|
|
|
// Do nothing...or?
|
|
|
|
}
|
2016-11-17 21:18:39 +00:00
|
|
|
?>
|
|
|
|
|
2016-11-21 09:22:50 +00:00
|
|
|
<div class="wrapper" id="wrapper-home">
|
2016-11-17 21:18:39 +00:00
|
|
|
|
2016-11-19 17:43:22 +00:00
|
|
|
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1">
|
2016-11-17 21:18:39 +00:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<!-- Do the left sidebar check -->
|
|
|
|
<?php get_template_part( 'global-templates/left-sidebar-check', 'none' ); ?>
|
2016-11-20 11:09:16 +00:00
|
|
|
<?php if ( 'masonry' === $posts_style ) : ?>
|
2016-11-17 21:18:39 +00:00
|
|
|
<div class="card-columns"><?php endif; ?>
|
|
|
|
<main class="site-main" id="main">
|
|
|
|
|
|
|
|
<?php if ( have_posts() ) : ?>
|
|
|
|
|
|
|
|
<?php /* Start the Loop */ ?>
|
|
|
|
|
|
|
|
<?php while ( have_posts() ) : the_post(); ?>
|
|
|
|
|
|
|
|
<?php
|
2016-11-20 11:09:16 +00:00
|
|
|
if ( 'masonry' === $posts_style ) :
|
|
|
|
get_template_part( 'loop-templates/content', 'card' );
|
|
|
|
elseif ( 'grid' === $posts_style ) :
|
|
|
|
|
|
|
|
get_template_part( 'loop-templates/content', 'grid' );
|
|
|
|
else :
|
|
|
|
/*
|
|
|
|
* Include the Post-Format-specific template for the content.
|
2016-11-17 21:18:39 +00:00
|
|
|
* If you want to override this in a child theme, then include a file
|
|
|
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
|
|
|
*/
|
|
|
|
get_template_part( 'loop-templates/content', get_post_format() );
|
|
|
|
endif;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php endwhile; ?>
|
|
|
|
|
|
|
|
<?php the_posts_navigation(); ?>
|
|
|
|
|
|
|
|
<?php else : ?>
|
|
|
|
|
|
|
|
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
2016-11-20 11:09:16 +00:00
|
|
|
<?php if ( 'masonry' === $posts_style ) : ?></div><?php endif; ?>
|
2016-11-17 21:18:39 +00:00
|
|
|
</main><!-- #main -->
|
|
|
|
|
|
|
|
</div><!-- #primary -->
|
|
|
|
|
|
|
|
<!-- Do the right sidebar check -->
|
2016-11-20 11:09:16 +00:00
|
|
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
2016-11-17 21:18:39 +00:00
|
|
|
|
|
|
|
<?php get_sidebar( 'right' ); ?>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
</div><!-- .row -->
|
|
|
|
|
|
|
|
</div><!-- Container end -->
|
|
|
|
|
|
|
|
</div><!-- Wrapper end -->
|
|
|
|
|
|
|
|
<?php get_footer(); ?>
|