2016-10-23 15:54:40 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Template Name: Vertical One Page
|
|
|
|
*
|
|
|
|
* Template for displaying a page without sidebar even if a sidebar widget is published
|
|
|
|
*
|
|
|
|
* @package understrap
|
|
|
|
*/
|
|
|
|
|
2016-11-18 22:15:39 +00:00
|
|
|
get_header();
|
|
|
|
$container = get_theme_mod( 'understrap_container_type' );
|
2016-11-01 15:25:21 +00:00
|
|
|
?>
|
2016-10-23 15:54:40 +00:00
|
|
|
|
|
|
|
<?php
|
2016-11-21 18:19:15 +00:00
|
|
|
|
2016-10-23 15:54:40 +00:00
|
|
|
/*
|
|
|
|
* Exclude the posts page from being shown in this layout.
|
|
|
|
* Order pages by their order number.
|
|
|
|
*/
|
2016-11-18 22:15:39 +00:00
|
|
|
$exclude = array();
|
2016-11-21 18:19:15 +00:00
|
|
|
// exclude blog page.
|
|
|
|
array_push( $exclude, get_option( 'page_for_posts' ) );
|
|
|
|
// exclude WooCommerce pages.
|
2016-11-18 22:15:39 +00:00
|
|
|
array_push( $exclude, get_option( 'woocommerce_cart_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_shop_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_checkout_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_pay_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_thanks_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_myaccount_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_edit_address_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_view_order_page_id' ) );
|
|
|
|
array_push( $exclude, get_option( 'woocommerce_terms_page_id' ) );
|
|
|
|
$args = array(
|
|
|
|
'post_type' => 'page',
|
2016-11-21 18:19:15 +00:00
|
|
|
'post__not_in' => $exclude,
|
2016-11-18 22:15:39 +00:00
|
|
|
'orderby' => 'menu_order',
|
2016-11-21 18:19:15 +00:00
|
|
|
'order' => 'ASC',
|
2016-11-18 22:15:39 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
$qry = new WP_Query( $args );
|
2016-10-23 15:54:40 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="wrapper" id="full-width-page-wrapper">
|
|
|
|
|
2016-11-19 17:43:22 +00:00
|
|
|
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-18 22:15:39 +00:00
|
|
|
<div class="col-md-12 content-area" id="primary">
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-18 22:15:39 +00:00
|
|
|
<main class="site-main" id="main" role="main">
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-21 18:19:15 +00:00
|
|
|
<?php if ( have_posts() ) : while ( $qry->have_posts() ) : $qry->the_post() ?>
|
2016-11-18 22:15:39 +00:00
|
|
|
<div class="page">
|
|
|
|
<?php get_template_part( 'loop-templates/content', 'verticalpage' ); ?>
|
|
|
|
</div>
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-21 18:19:15 +00:00
|
|
|
<?php wp_reset_postdata(); // reset custom query. ?>
|
|
|
|
<?php
|
|
|
|
endwhile;
|
|
|
|
endif;
|
|
|
|
?>
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-18 22:15:39 +00:00
|
|
|
</main><!-- #main -->
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-18 22:15:39 +00:00
|
|
|
</div><!-- #primary -->
|
2016-10-23 15:54:40 +00:00
|
|
|
|
2016-11-18 22:15:39 +00:00
|
|
|
</div><!-- Container end -->
|
2016-10-23 15:54:40 +00:00
|
|
|
|
|
|
|
</div><!-- Wrapper end -->
|
|
|
|
|
|
|
|
<?php get_footer(); ?>
|