This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/page-templates/vertical-one-page.php

54 lines
1.2 KiB
PHP
Raw Normal View History

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
*/
get_header();
?>
2016-10-23 15:54:40 +00:00
<?php
/*
* Exclude the posts page from being shown in this layout.
* Order pages by their order number.
*/
$exclude = get_option( 'page_for_posts' );
$args = array(
'post_type' => 'page',
'post__not_in' => array( $exclude ),
'orderby' => 'menu_order',
'order' => 'ASC'
);
$qry = new WP_Query( $args );
2016-10-23 15:54:40 +00:00
?>
<div class="wrapper" id="full-width-page-wrapper">
2016-11-01 16:13:23 +00:00
<div class="container" id="content">
2016-10-23 15:54:40 +00:00
2016-11-01 16:13:23 +00:00
<div class="col-md-12 content-area" id="primary">
2016-10-23 15:54:40 +00:00
2016-11-01 16:13:23 +00:00
<main class="site-main" id="main" role="main">
2016-10-23 15:54:40 +00:00
<?php if ( have_posts() ): while ( $qry->have_posts() ): $qry->the_post() ?>
<div class="page">
<?php get_template_part( 'loop-templates/content', 'verticalpage' ); ?>
</div>
2016-10-23 15:54:40 +00:00
<?php wp_reset_postdata(); //reset custom query?>
<?php endwhile; endif; ?>
2016-10-23 15:54:40 +00:00
</main><!-- #main -->
2016-10-23 15:54:40 +00:00
</div><!-- #primary -->
2016-10-23 15:54:40 +00:00
</div><!-- Container end -->
2016-10-23 15:54:40 +00:00
</div><!-- Wrapper end -->
<?php get_footer(); ?>