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 18:47:05 +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' );
|
2016-11-21 09:22:50 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
if ( is_front_page() && is_home() ) {
|
|
|
|
get_sidebar( 'hero' );
|
2016-11-21 09:22:50 +00:00
|
|
|
|
2016-11-21 18:47:05 +00:00
|
|
|
get_sidebar( 'statichero' );
|
|
|
|
}
|
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-21 18:47:05 +00:00
|
|
|
<?php if ( 'masonry' === $posts_style ) : ?></div><?php endif; ?>
|
2016-11-17 21:18:39 +00:00
|
|
|
</main><!-- #main -->
|
|
|
|
|
2016-11-23 09:42:53 +00:00
|
|
|
<?php understrap_pagination(); ?>
|
|
|
|
|
2016-11-17 21:18:39 +00:00
|
|
|
</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 -->
|
2016-11-23 09:42:53 +00:00
|
|
|
|
2016-11-17 21:18:39 +00:00
|
|
|
</div><!-- Container end -->
|
|
|
|
|
|
|
|
</div><!-- Wrapper end -->
|
|
|
|
|
|
|
|
<?php get_footer(); ?>
|