first commit
This commit is contained in:
34
page-templates/full.php
Normal file
34
page-templates/full.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Full width template
|
||||
*
|
||||
* @package PressBook
|
||||
*/
|
||||
|
||||
$pressbook_settings = PressBook\PageSettings::get_meta_config( get_the_ID() );
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="pb-content-sidebar<?php echo esc_attr( $pressbook_settings['wrapper_class'] ); ?>">
|
||||
<main id="primary" class="site-main<?php echo esc_attr( $pressbook_settings['site_main_class'] ); ?>">
|
||||
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', $pressbook_settings['page_content'] );
|
||||
}
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) {
|
||||
comments_template();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</main><!-- #primary -->
|
||||
</div><!-- .pb-content-sidebar -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
34
page-templates/large.php
Normal file
34
page-templates/large.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Large width template
|
||||
*
|
||||
* @package PressBook
|
||||
*/
|
||||
|
||||
$pressbook_settings = PressBook\PageSettings::get_meta_config( get_the_ID() );
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="pb-content-sidebar u-wrapper<?php echo esc_attr( $pressbook_settings['wrapper_class'] ); ?>">
|
||||
<main id="primary" class="site-main<?php echo esc_attr( $pressbook_settings['site_main_class'] ); ?>">
|
||||
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', $pressbook_settings['page_content'] );
|
||||
}
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) {
|
||||
comments_template();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</main><!-- #primary -->
|
||||
</div><!-- .pb-content-sidebar -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
34
page-templates/medium.php
Normal file
34
page-templates/medium.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Medium width template
|
||||
*
|
||||
* @package PressBook
|
||||
*/
|
||||
|
||||
$pressbook_settings = PressBook\PageSettings::get_meta_config( get_the_ID() );
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="pb-content-sidebar u-wrapper<?php echo esc_attr( $pressbook_settings['wrapper_class'] ); ?>">
|
||||
<main id="primary" class="site-main<?php echo esc_attr( $pressbook_settings['site_main_class'] ); ?>">
|
||||
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', $pressbook_settings['page_content'] );
|
||||
}
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) {
|
||||
comments_template();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</main><!-- #primary -->
|
||||
</div><!-- .pb-content-sidebar -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
39
page-templates/sidebar.php
Normal file
39
page-templates/sidebar.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Page with sidebar
|
||||
*
|
||||
* @package PressBook
|
||||
*/
|
||||
|
||||
$pressbook_settings = PressBook\PageSettings::get_meta_config( get_the_ID() );
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="pb-content-sidebar u-wrapper<?php echo esc_attr( $pressbook_settings['wrapper_class'] ); ?>">
|
||||
<main id="primary" class="site-main<?php echo esc_attr( $pressbook_settings['site_main_class'] ); ?>">
|
||||
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', $pressbook_settings['page_content'] );
|
||||
}
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) {
|
||||
comments_template();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</main><!-- #primary -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'left' );
|
||||
get_sidebar();
|
||||
?>
|
||||
</div><!-- .pb-content-sidebar -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
34
page-templates/small.php
Normal file
34
page-templates/small.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Template Name: Small width template
|
||||
*
|
||||
* @package PressBook
|
||||
*/
|
||||
|
||||
$pressbook_settings = PressBook\PageSettings::get_meta_config( get_the_ID() );
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="pb-content-sidebar u-wrapper<?php echo esc_attr( $pressbook_settings['wrapper_class'] ); ?>">
|
||||
<main id="primary" class="site-main<?php echo esc_attr( $pressbook_settings['site_main_class'] ); ?>">
|
||||
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', $pressbook_settings['page_content'] );
|
||||
}
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) {
|
||||
comments_template();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</main><!-- #primary -->
|
||||
</div><!-- .pb-content-sidebar -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
Reference in New Issue
Block a user