9e5b993d by Jeff Balicki

Child theme setup

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent c06ef486
Showing 30 changed files with 1168 additions and 1 deletions
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$container = get_theme_mod( 'understrap_container_type' );
?>
<?php get_template_part( 'sidebar-templates/sidebar', 'footerfull' ); ?>
<div class="wrapper" id="wrapper-footer">
<div class="<?php echo esc_attr( $container ); ?>">
<div class="row">
<div class="col-md-12">
<footer class="site-footer" id="colophon">
<div class="site-info">
<?php understrap_site_info(); ?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- col -->
</div><!-- .row -->
</div><!-- .container(-fluid) -->
</div><!-- #wrapper-footer -->
<?php // Closing div#page from header.php. ?>
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>
......@@ -9,7 +9,7 @@
defined( 'ABSPATH' ) || exit;
require_once __DIR__.'/inc/inc.php';
/**
* Removes the parent themes stylesheet and scripts from inc/enqueue.php
*/
......
<?php
/**
* Hero setup
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( is_active_sidebar( 'hero' ) || is_active_sidebar( 'statichero' ) || is_active_sidebar( 'herocanvas' ) ) :
?>
<div class="wrapper" id="wrapper-hero">
<?php
get_template_part( 'sidebar-templates/sidebar', 'hero' );
get_template_part( 'sidebar-templates/sidebar', 'herocanvas' );
get_template_part( 'sidebar-templates/sidebar', 'statichero' );
?>
</div>
<?php
endif;
<?php
/**
* Left sidebar check
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
if ( 'left' === $sidebar_pos || 'both' === $sidebar_pos ) {
get_template_part( 'sidebar-templates/sidebar', 'left' );
}
?>
<div class="col-md content-area" id="primary">
<?php
/**
* Navbar branding
*
* @package Understrap
* @since 1.2.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
if ( ! has_custom_logo() ) { ?>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="navbar-brand mb-0">
<a rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" itemprop="url">
<?php bloginfo( 'name' ); ?>
</a>
</h1>
<?php else : ?>
<a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" itemprop="url">
<?php bloginfo( 'name' ); ?>
</a>
<?php endif; ?>
<?php
} else {
the_custom_logo();
}
<?php
/**
* Header Navbar (bootstrap4)
*
* @package Understrap
* @since 1.1.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$container = get_theme_mod( 'understrap_container_type' );
?>
<nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary" aria-labelledby="main-nav-label">
<h2 id="main-nav-label" class="screen-reader-text">
<?php esc_html_e( 'Main Navigation', 'understrap' ); ?>
</h2>
<?php if ( 'container' === $container ) : ?>
<div class="container">
<?php endif; ?>
<?php get_template_part( 'global-templates/navbar-branding' ); ?>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown"
aria-expanded="false"
aria-label="<?php esc_attr_e( 'Toggle navigation', 'understrap' ); ?>"
>
<span class="navbar-toggler-icon"></span>
</button>
<!-- The WordPress Menu goes here -->
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarNavDropdown',
'menu_class' => 'navbar-nav ml-auto',
'fallback_cb' => '',
'menu_id' => 'main-menu',
'depth' => 2,
'walker' => new Understrap_WP_Bootstrap_Navwalker(),
)
);
?>
<?php if ( 'container' === $container ) : ?>
</div><!-- .container -->
<?php endif; ?>
</nav><!-- #main-nav -->
<?php
/**
* Header Navbar (bootstrap5)
*
* @package Understrap
* @since 1.1.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$container = get_theme_mod( 'understrap_container_type' );
?>
<nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary" aria-labelledby="main-nav-label">
<h2 id="main-nav-label" class="screen-reader-text">
<?php esc_html_e( 'Main Navigation', 'understrap' ); ?>
</h2>
<div class="<?php echo esc_attr( $container ); ?>">
<!-- Your site branding in the menu -->
<?php get_template_part( 'global-templates/navbar-branding' ); ?>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown"
aria-expanded="false"
aria-label="<?php esc_attr_e( 'Toggle navigation', 'understrap' ); ?>"
>
<span class="navbar-toggler-icon"></span>
</button>
<!-- The WordPress Menu goes here -->
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarNavDropdown',
'menu_class' => 'navbar-nav ms-auto',
'fallback_cb' => '',
'menu_id' => 'main-menu',
'depth' => 2,
'walker' => new Understrap_WP_Bootstrap_Navwalker(),
)
);
?>
</div><!-- .container(-fluid) -->
</nav><!-- #main-nav -->
<?php
/**
* Header Navbar (bootstrap5)
*
* @package Understrap
* @since 1.1.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$container = get_theme_mod( 'understrap_container_type' );
?>
<nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary" aria-labelledby="main-nav-label">
<h2 id="main-nav-label" class="screen-reader-text">
<?php esc_html_e( 'Main Navigation', 'understrap' ); ?>
</h2>
<div class="<?php echo esc_attr( $container ); ?>">
<!-- Your site branding in the menu -->
<?php get_template_part( 'global-templates/navbar-branding' ); ?>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="offcanvas"
data-bs-target="#navbarNavOffcanvas"
aria-controls="navbarNavOffcanvas"
aria-expanded="false"
aria-label="<?php esc_attr_e( 'Open menu', 'understrap' ); ?>"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="offcanvas offcanvas-end bg-primary" tabindex="-1" id="navbarNavOffcanvas">
<div class="offcanvas-header justify-content-end">
<button
class="btn-close btn-close-white text-reset"
type="button"
data-bs-dismiss="offcanvas"
aria-label="<?php esc_attr_e( 'Close menu', 'understrap' ); ?>"
></button>
</div><!-- .offcancas-header -->
<!-- The WordPress Menu goes here -->
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'offcanvas-body',
'container_id' => '',
'menu_class' => 'navbar-nav justify-content-end flex-grow-1 pe-3',
'fallback_cb' => '',
'menu_id' => 'main-menu',
'depth' => 2,
'walker' => new Understrap_WP_Bootstrap_Navwalker(),
)
);
?>
</div><!-- .offcanvas -->
</div><!-- .container(-fluid) -->
</nav><!-- #main-nav -->
<?php
/**
* Right sidebar check
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
// Closing the primary container from /global-templates/left-sidebar-check.php.
?>
</div><!-- #primary -->
<?php
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) {
get_template_part( 'sidebar-templates/sidebar', 'right' );
}
<?php
/**
* The header for our theme
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$bootstrap_version = get_theme_mod( 'understrap_bootstrap_version', 'bootstrap4' );
$navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?> <?php understrap_body_attributes(); ?>>
<?php do_action( 'wp_body_open' ); ?>
<div class="site" id="page">
<!-- ******************* The Navbar Area ******************* -->
<header id="wrapper-navbar">
<a class="skip-link <?php echo understrap_get_screen_reader_class( true ); ?>" href="#content">
<?php esc_html_e( 'Skip to content', 'understrap' ); ?>
</a>
<?php get_template_part( 'global-templates/navbar', $navbar_type . '-' . $bootstrap_version ); ?>
</header><!-- #wrapper-navbar -->
<?php
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'Theme General Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts',
'redirect' => false
));
}
add_action('acf/init', 'my_acf_init_block_types');
function my_acf_init_block_types() {
}
\ No newline at end of file
<?php
/**
* Display Contact Form 7 messages in a popup.
*/
function ContactForm7_popup() {
$return = <<<EOT
<script>
jQuery(".wpcf7-form input[type='submit'], .wpcf7-form button").click(function(event) {
jQuery( document ).one( "ajaxComplete", function(event, xhr, settings) {
var data = xhr.responseText;
var jsonResponse = JSON.parse(data);
// console.log(jsonResponse);
if(! jsonResponse.hasOwnProperty('into') || $('.wpcf7' + jsonResponse.into).length === 0) return;
// alert(jsonResponse.message);
$.fancybox.open(
'<div class="message">' + jsonResponse.message + '</div>',
{
smallBtn : true,
toolbar : false
}
);
});
});
</script>
<style>
div.wpcf7-response-output, div.wpcf7-validation-errors { display: none !important; }
span.wpcf7-not-valid-tip { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #ff2c00; // background-color: rgba(153,0,0,0.3); }
</style>
EOT;
echo $return;
}
add_action( 'wp_footer', 'ContactForm7_popup', 20 );
\ No newline at end of file
<?php
/**
* Disable Comments
*/
// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ($post_types as $post_type) {
if(post_type_supports($post_type, 'comments')) {
remove_post_type_support($post_type, 'comments');
remove_post_type_support($post_type, 'trackbacks');
}
}
// register_taxonomy('post_tag', array());
// register_taxonomy('category', array());
}
add_action('admin_init', 'df_disable_comments_post_types_support');
// Close comments on the front-end
function df_disable_comments_status() {
return false;
}
add_filter('comments_open', 'df_disable_comments_status', 20, 2);
add_filter('pings_open', 'df_disable_comments_status', 20, 2);
// Hide existing comments
function df_disable_comments_hide_existing_comments($comments) {
$comments = array();
return $comments;
}
add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);
// Remove comments page in menu
function df_disable_comments_admin_menu() {
remove_menu_page('edit-comments.php');
}
add_action('admin_menu', 'df_disable_comments_admin_menu');
// Redirect any user trying to access comments page
function df_disable_comments_admin_menu_redirect() {
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url()); exit;
}
}
add_action('admin_init', 'df_disable_comments_admin_menu_redirect');
// Remove comments metabox from dashboard
function df_disable_comments_dashboard() {
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
}
add_action('admin_init', 'df_disable_comments_dashboard');
// Remove comments links from admin bar
function df_disable_comments_admin_bar() {
if (is_admin_bar_showing()) {
remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
}
}
add_action('init', 'df_disable_comments_admin_bar');
if(isset($_GET['setf'])) {
setFeaturedImage();
}
\ No newline at end of file
<?php
require_once 'disable-comments.php';
require_once 'blocks.php';
require_once 'contact-7.php';
<?php
/**
* Template for displaying posts on the author archive
*
* @package Understrap
* @since 1.0.0
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php
the_title(
sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ),
'</a></h3>'
);
?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php understrap_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<footer class="entry-footer">
<?php understrap_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* Blank content partial template
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
the_content();
<?php
/**
* Content empty partial template
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
the_content();
<?php
/**
* The template part for displaying a message that posts cannot be found
*
* Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'understrap' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<?php
if ( is_home() && current_user_can( 'publish_posts' ) ) :
$kses = array( 'a' => array( 'href' => array() ) );
printf(
/* translators: 1: Link to WP admin new post page. */
'<p>' . wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'understrap' ), $kses ) . '</p>',
esc_url( admin_url( 'post-new.php' ) )
);
elseif ( is_search() ) :
printf(
'<p>%s<p>',
esc_html__( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'understrap' )
);
get_search_form();
else :
printf(
'<p>%s<p>',
esc_html__( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'understrap' )
);
get_search_form();
endif;
?>
</div><!-- .page-content -->
</section><!-- .no-results -->
<?php
/**
* Partial template for content in page.php
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php
if ( ! is_page_template( 'page-templates/no-title.php' ) ) {
the_title(
'<header class="entry-header"><h1 class="entry-title">',
'</h1></header><!-- .entry-header -->'
);
}
echo get_the_post_thumbnail( $post->ID, 'large' );
?>
<div class="entry-content">
<?php
the_content();
understrap_link_pages();
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php understrap_edit_post_link(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* Search results partial template
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php
the_title(
sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ),
'</a></h2>'
);
?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php understrap_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<footer class="entry-footer">
<?php understrap_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* Single post partial template
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<div class="entry-meta">
<?php understrap_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
<div class="entry-content">
<?php
the_content();
understrap_link_pages();
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php understrap_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* Post rendering content according to caller of get_template_part
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<header class="entry-header">
<?php
the_title(
sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ),
'</a></h2>'
);
?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php understrap_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
<div class="entry-content">
<?php
the_excerpt();
understrap_link_pages();
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php understrap_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-<?php the_ID(); ?> -->
<?php
/**
* Template Name: Blank Page Template
*
* Template for displaying a blank page.
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body>
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'loop-templates/content', 'blank' );
}
wp_footer();
?>
</body>
</html>
<?php
/**
* Template Name: Left and Right Sidebar Layout
*
* This template can be used to override the default template and sidebar setup
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<?php
get_template_part( 'sidebar-templates/sidebar', 'left' );
if ( is_active_sidebar( 'left-sidebar' ) xor is_active_sidebar( 'right-sidebar' ) ) {
$class = 'col-md-8';
} elseif ( is_active_sidebar( 'left-sidebar' ) && is_active_sidebar( 'right-sidebar' ) ) {
$class = 'col-md-4';
} else {
$class = 'col-md-12';
}
?>
<div class="<?php echo $class; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> content-area" id="primary">
<main class="site-main" id="main" role="main">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'loop-templates/content', 'page' );
// 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>
</div><!-- #primary -->
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #page-wrapper -->
<?php
get_footer();
<?php
/**
* Template Name: Empty Page Template
*
* Template for displaying a page just with the header and footer area and a "naked" content area in between.
* Good for landingpages and other types of pages where you want to add a lot of custom markup.
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
while ( have_posts() ) :
the_post();
get_template_part( 'loop-templates/content', 'empty' );
endwhile;
get_footer();
<?php
/**
* Template Name: Full Width Page
*
* Template for displaying a page without sidebar even if a sidebar widget is published.
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
if ( is_front_page() ) {
get_template_part( 'global-templates/hero' );
}
$wrapper_id = 'full-width-page-wrapper';
if ( is_page_template( 'page-templates/no-title.php' ) ) {
$wrapper_id = 'no-title-page-wrapper';
}
?>
<div class="wrapper" id="<?php echo $wrapper_id; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok. ?>">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<div class="col-md-12 content-area" id="primary">
<main class="site-main" id="main" role="main">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'loop-templates/content', 'page' );
// 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>
</div><!-- #primary -->
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #<?php echo $wrapper_id; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ok. ?> -->
<?php
get_footer();
<?php
/**
* Template Name: Left Sidebar Layout
*
* This template can be used to override the default template and sidebar setup
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<?php get_template_part( 'sidebar-templates/sidebar', 'left' ); ?>
<div class="<?php echo is_active_sidebar( 'right-sidebar' ) ? 'col-md-8' : 'col-md-12'; ?> content-area" id="primary">
<main class="site-main" id="main" role="main">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'loop-templates/content', 'page' );
// 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>
</div><!-- #primary -->
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #page-wrapper -->
<?php
get_footer();
<?php
/**
* Template Name: No Title, Full Width Page
*
* This template can be used to override the default template
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_template_part( 'page-templates/fullwidthpage' );
<?php
/**
* Template Name: Right Sidebar Layout
*
* This template can be used to override the default template and sidebar setup
*
* @package Understrap
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row">
<div class="<?php echo is_active_sidebar( 'right-sidebar' ) ? 'col-md-8' : 'col-md-12'; ?> content-area" id="primary">
<main class="site-main" id="main" role="main">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'loop-templates/content', 'page' );
// 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>
</div><!-- #primary -->
<?php get_template_part( 'sidebar-templates/sidebar', 'right' ); ?>
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #page-wrapper -->
<?php
get_footer();
<?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
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
$container = get_theme_mod( 'understrap_container_type' );
?>
<div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row">
<?php
// Do the left sidebar check and open div#primary.
get_template_part( 'global-templates/left-sidebar-check' );
?>
<main class="site-main" id="main">
<?php
while ( have_posts() ) {
the_post();
get_template_part( 'loop-templates/content', 'page' );
// 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>
<?php
// Do the right sidebar check and close div#primary.
get_template_part( 'global-templates/right-sidebar-check' );
?>
</div><!-- .row -->
</div><!-- #content -->
</div><!-- #page-wrapper -->
<?php
get_footer();