root files code format
This commit is contained in:
parent
92f662269c
commit
c4e5d495d4
12
404.php
12
404.php
|
@ -1,10 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* The template for displaying 404 pages (not found).
|
* The template for displaying 404 pages (not found).
|
||||||
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
?>
|
||||||
<div class="wrapper" id="404-wrapper">
|
<div class="wrapper" id="404-wrapper">
|
||||||
|
|
||||||
|
@ -20,13 +21,15 @@
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
|
|
||||||
<h1 class="page-title"><?php _e( 'Oops! That page can’t be found.', 'understrap' ); ?></h1>
|
<h1 class="page-title"><?php _e( 'Oops! That page can’t be found.',
|
||||||
|
'understrap' ); ?></h1>
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'understrap' ); ?></p>
|
<p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?',
|
||||||
|
'understrap' ); ?></p>
|
||||||
|
|
||||||
<?php get_search_form(); ?>
|
<?php get_search_form(); ?>
|
||||||
|
|
||||||
|
@ -56,7 +59,8 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* translators: %1$s: smiley */
|
/* translators: %1$s: smiley */
|
||||||
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'understrap' ), convert_smilies( ':)' ) ) . '</p>';
|
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s',
|
||||||
|
'understrap' ), convert_smilies( ':)' ) ) . '</p>';
|
||||||
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
|
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
14
archive.php
14
archive.php
|
@ -7,12 +7,12 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$container = get_theme_mod('understrap_container_type');
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php get_template_part( 'global-templates/variables', 'none' ); ?>
|
<?php get_template_part( 'global-templates/variables', 'none' ); ?>
|
||||||
|
@ -42,7 +42,9 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Include the Post-Format-specific template for the content.
|
|
||||||
|
/*
|
||||||
|
* Include the Post-Format-specific template for the content.
|
||||||
* If you want to override this in a child theme, then include a file
|
* 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.
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||||
*/
|
*/
|
||||||
|
@ -64,7 +66,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ): ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_sidebar( 'right' ); ?>
|
||||||
|
|
||||||
|
@ -72,7 +74,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
|
|
||||||
</div> <!-- .row -->
|
</div> <!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- Container end -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- Wrapper end -->
|
||||||
|
|
||||||
|
|
31
author.php
31
author.php
|
@ -6,9 +6,10 @@
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
get_header();
|
|
||||||
$container = get_theme_mod('understrap_container_type');
|
get_header();
|
||||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,19 +27,22 @@
|
||||||
<header class="page-header author-header">
|
<header class="page-header author-header">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
|
$curauth = ( isset( $_GET['author_name'] ) ) ? get_user_by( 'slug',
|
||||||
|
$author_name ) : get_userdata( intval( $author ) );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1><?php esc_html_e( 'About:', 'understrap' ); ?> <?php echo esc_html( $curauth->nickname ); ?></h1>
|
<h1><?php esc_html_e( 'About:', 'understrap' ); ?><?php echo esc_html( $curauth->nickname ); ?></h1>
|
||||||
|
|
||||||
<?php if ( ! empty( $curauth->ID ) ) : ?>
|
<?php if ( ! empty( $curauth->ID ) ) : ?>
|
||||||
<?php echo get_avatar($curauth->ID); ?>
|
<?php echo get_avatar( $curauth->ID ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
||||||
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
||||||
<dd><a href="<?php echo esc_html( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a></dd>
|
<dd>
|
||||||
|
<a href="<?php echo esc_html( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
|
||||||
|
</dd>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( ! empty( $curauth->user_description ) ) : ?>
|
<?php if ( ! empty( $curauth->user_description ) ) : ?>
|
||||||
|
@ -47,7 +51,8 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2><?php esc_html_e( 'Posts by', 'understrap' ); ?> <?php echo esc_html( $curauth->nickname ); ?>:</h2>
|
<h2><?php esc_html_e( 'Posts by', 'understrap' ); ?> <?php echo esc_html( $curauth->nickname ); ?>
|
||||||
|
:</h2>
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
@ -57,9 +62,11 @@
|
||||||
<?php if ( have_posts() ) : ?>
|
<?php if ( have_posts() ) : ?>
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
<li>
|
<li>
|
||||||
<a rel="bookmark" href="<?php the_permalink() ?>" title="Permanent Link: <?php the_title(); ?>">
|
<a rel="bookmark" href="<?php the_permalink() ?>"
|
||||||
|
title="Permanent Link: <?php the_title(); ?>">
|
||||||
<?php the_title(); ?></a>,
|
<?php the_title(); ?></a>,
|
||||||
<?php understrap_posted_on(); ?> <?php esc_html_e( 'in', 'understrap' ); ?> <?php the_category('&');?>
|
<?php understrap_posted_on(); ?> <?php esc_html_e( 'in',
|
||||||
|
'understrap' ); ?> <?php the_category( '&' ); ?>
|
||||||
</li>
|
</li>
|
||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
@ -80,7 +87,7 @@
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ): ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_sidebar( 'right' ); ?>
|
||||||
|
|
||||||
|
@ -88,7 +95,7 @@
|
||||||
|
|
||||||
</div> <!-- .row -->
|
</div> <!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- Container end -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- Wrapper end -->
|
||||||
|
|
||||||
|
|
39
comments.php
39
comments.php
|
@ -25,21 +25,25 @@ if ( post_password_required() ) {
|
||||||
<?php if ( have_comments() ) : ?>
|
<?php if ( have_comments() ) : ?>
|
||||||
<h2 class="comments-title">
|
<h2 class="comments-title">
|
||||||
<?php
|
<?php
|
||||||
printf( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'understrap' ),
|
printf( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”',
|
||||||
|
get_comments_number(), 'comments title', 'understrap' ),
|
||||||
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
|
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
|
||||||
<nav class="comment-navigation" id="comment-nav-above">
|
<nav class="comment-navigation" id="comment-nav-above">
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||||
<?php if ( get_previous_comments_link() ) { ?>
|
<?php if ( get_previous_comments_link() ) { ?>
|
||||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'understrap' ) ); ?></div>
|
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
||||||
<?php } if ( get_next_comments_link() ) { ?>
|
'understrap' ) ); ?></div>
|
||||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?></div>
|
<?php }
|
||||||
|
if ( get_next_comments_link() ) { ?>
|
||||||
|
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
||||||
|
'understrap' ) ); ?></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</nav><!-- #comment-nav-above -->
|
</nav><!-- #comment-nav-above -->
|
||||||
<?php endif; // check for comment navigation ?>
|
<?php endif; // check for comment navigation. ?>
|
||||||
|
|
||||||
<ol class="comment-list">
|
<ol class="comment-list">
|
||||||
<?php
|
<?php
|
||||||
|
@ -50,18 +54,21 @@ if ( post_password_required() ) {
|
||||||
?>
|
?>
|
||||||
</ol><!-- .comment-list -->
|
</ol><!-- .comment-list -->
|
||||||
|
|
||||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through. ?>
|
||||||
<nav class="comment-navigation" id="comment-nav-below">
|
<nav class="comment-navigation" id="comment-nav-below">
|
||||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||||
<?php if ( get_previous_comments_link() ) { ?>
|
<?php if ( get_previous_comments_link() ) { ?>
|
||||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'understrap' ) );?></div>
|
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
||||||
<?php } if ( get_next_comments_link() ) { ?>
|
'understrap' ) ); ?></div>
|
||||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?></div>
|
<?php }
|
||||||
|
if ( get_next_comments_link() ) { ?>
|
||||||
|
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
||||||
|
'understrap' ) ); ?></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</nav><!-- #comment-nav-below -->
|
</nav><!-- #comment-nav-below -->
|
||||||
<?php endif; // check for comment navigation ?>
|
<?php endif; // check for comment navigation. ?>
|
||||||
|
|
||||||
<?php endif; // have_comments() ?>
|
<?php endif; // endif have_comments(). ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||||
|
@ -72,12 +79,6 @@ if ( post_password_required() ) {
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php
|
<?php comment_form(); // Render comments form. ?>
|
||||||
/* Loads the comment-form.php template
|
|
||||||
/* get_template_part('comment-form');
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
|
|
||||||
<?php comment_form(); ?>
|
|
||||||
|
|
||||||
</div><!-- #comments -->
|
</div><!-- #comments -->
|
||||||
|
|
19
footer.php
19
footer.php
|
@ -8,12 +8,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$the_theme = wp_get_theme();
|
$the_theme = wp_get_theme();
|
||||||
$container = get_theme_mod('understrap_container_type');
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php get_sidebar('footerfull'); ?>
|
<?php get_sidebar( 'footerfull' ); ?>
|
||||||
|
|
||||||
<div class="wrapper" id="wrapper-footer">
|
<div class="wrapper" id="wrapper-footer">
|
||||||
|
|
||||||
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
||||||
|
|
||||||
|
@ -24,9 +24,12 @@ $container = get_theme_mod('understrap_container_type');
|
||||||
<footer class="site-footer" id="colophon" role="contentinfo">
|
<footer class="site-footer" id="colophon" role="contentinfo">
|
||||||
|
|
||||||
<div class="site-info">
|
<div class="site-info">
|
||||||
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'understrap' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'understrap' ), 'WordPress' ); ?></a>
|
<a href="<?php echo esc_url( __( 'http://wordpress.org/',
|
||||||
|
'understrap' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'understrap' ),
|
||||||
|
'WordPress' ); ?></a>
|
||||||
<span class="sep"> | </span>
|
<span class="sep"> | </span>
|
||||||
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href="http://understrap.com/">understrap.com</a>' ); ?>
|
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ),
|
||||||
|
'<a href="http://understrap.com/">understrap.com</a>' ); ?>
|
||||||
(<?php printf( __( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ); ?>)
|
(<?php printf( __( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ); ?>)
|
||||||
</div><!-- .site-info -->
|
</div><!-- .site-info -->
|
||||||
|
|
||||||
|
@ -38,11 +41,11 @@ $container = get_theme_mod('understrap_container_type');
|
||||||
|
|
||||||
</div><!-- container end -->
|
</div><!-- container end -->
|
||||||
|
|
||||||
</div><!-- wrapper end -->
|
</div><!-- wrapper end -->
|
||||||
|
|
||||||
</div><!-- #page -->
|
</div><!-- #page -->
|
||||||
|
|
||||||
<?php wp_footer(); ?>
|
<?php wp_footer(); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* understrap functions and definitions
|
* Understrap functions and definitions
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
@ -18,8 +18,8 @@ require get_template_directory() . '/inc/setup.php';
|
||||||
require get_template_directory() . '/inc/widgets.php';
|
require get_template_directory() . '/inc/widgets.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load functions to secure your WP install.
|
* Load functions to secure your WP install.
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/security.php';
|
require get_template_directory() . '/inc/security.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,18 +53,18 @@ require get_template_directory() . '/inc/custom-comments.php';
|
||||||
require get_template_directory() . '/inc/jetpack.php';
|
require get_template_directory() . '/inc/jetpack.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load custom WordPress nav walker.
|
* Load custom WordPress nav walker.
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/bootstrap-wp-navwalker.php';
|
require get_template_directory() . '/inc/bootstrap-wp-navwalker.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load custom WordPress gallery.
|
* Load custom WordPress gallery.
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/bootstrap-wp-gallery.php';
|
require get_template_directory() . '/inc/bootstrap-wp-gallery.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load WooCommerce functions.
|
* Load WooCommerce functions.
|
||||||
*/
|
*/
|
||||||
require get_template_directory() . '/inc/woocommerce.php';
|
require get_template_directory() . '/inc/woocommerce.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
31
header.php
31
header.php
|
@ -6,10 +6,9 @@
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $container = get_theme_mod('understrap_container_type'); ?>
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html <?php language_attributes(); ?>>
|
<html <?php language_attributes(); ?>>
|
||||||
<head>
|
<head>
|
||||||
|
@ -18,7 +17,8 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-title" content="<?php bloginfo('name'); ?> - <?php bloginfo('description'); ?>">
|
<meta name="apple-mobile-web-app-title"
|
||||||
|
content="<?php bloginfo( 'name' ); ?> - <?php bloginfo( 'description' ); ?>">
|
||||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
|
@ -26,28 +26,35 @@
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
|
||||||
<div class="hfeed site" id="page">
|
<div class="hfeed site" id="page">
|
||||||
|
|
||||||
<!-- ******************* The Navbar Area ******************* -->
|
<!-- ******************* The Navbar Area ******************* -->
|
||||||
<div class="wrapper-fluid wrapper-navbar" id="wrapper-navbar">
|
<div class="wrapper-fluid wrapper-navbar" id="wrapper-navbar">
|
||||||
|
|
||||||
<a class="skip-link screen-reader-text sr-only" href="#content"><?php _e( 'Skip to content', 'understrap' ); ?></a>
|
<a class="skip-link screen-reader-text sr-only" href="#content"><?php _e( 'Skip to content',
|
||||||
|
'understrap' ); ?></a>
|
||||||
|
|
||||||
<nav class="navbar navbar-dark bg-inverse site-navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
|
<nav class="navbar navbar-dark bg-inverse site-navigation" itemscope="itemscope"
|
||||||
|
itemtype="http://schema.org/SiteNavigationElement">
|
||||||
|
|
||||||
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
<div class="<?php echo esc_html( $container ); ?>" id="content">
|
||||||
|
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
||||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||||
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target=".exCollapsingNavbar" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation"></button>
|
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse"
|
||||||
|
data-target=".exCollapsingNavbar" aria-controls="exCollapsingNavbar" aria-expanded="false"
|
||||||
|
aria-label="Toggle navigation"></button>
|
||||||
|
|
||||||
<!-- Your site title as branding in the menu -->
|
<!-- Your site title as branding in the menu -->
|
||||||
<?php if (!has_custom_logo()) { ?>
|
<?php if ( ! has_custom_logo() ) { ?>
|
||||||
<a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
|
<a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>"
|
||||||
|
title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
|
||||||
<?php bloginfo( 'name' ); ?>
|
<?php bloginfo( 'name' ); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } else { the_custom_logo(); } ?><!-- end custom logo -->
|
<?php } else {
|
||||||
|
the_custom_logo();
|
||||||
|
} ?><!-- end custom logo -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -60,7 +67,7 @@
|
||||||
'menu_class' => 'nav navbar-nav',
|
'menu_class' => 'nav navbar-nav',
|
||||||
'fallback_cb' => '',
|
'fallback_cb' => '',
|
||||||
'menu_id' => 'main-menu',
|
'menu_id' => 'main-menu',
|
||||||
'walker' => new WP_Bootstrap_Navwalker()
|
'walker' => new WP_Bootstrap_Navwalker(),
|
||||||
)
|
)
|
||||||
); ?>
|
); ?>
|
||||||
|
|
||||||
|
|
17
home.php
17
home.php
|
@ -12,18 +12,15 @@
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
|
$posts_style = get_theme_mod( 'understrap_posts_index_style' );
|
||||||
|
|
||||||
$container = get_theme_mod('understrap_container_type');
|
if ( is_front_page() && is_home() ) {
|
||||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
get_sidebar( 'hero' );
|
||||||
$posts_style = get_theme_mod( 'understrap_posts_index_style' );
|
|
||||||
|
|
||||||
if ( is_front_page() && is_home() ) {
|
get_sidebar( 'statichero' );
|
||||||
get_sidebar('hero');
|
}
|
||||||
|
|
||||||
get_sidebar('statichero');
|
|
||||||
} else {
|
|
||||||
// Do nothing...or?
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper" id="wrapper-home">
|
<div class="wrapper" id="wrapper-home">
|
||||||
|
|
24
index.php
24
index.php
|
@ -11,18 +11,16 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
$container = get_theme_mod('understrap_container_type');
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
|
|
||||||
if ( is_front_page() && is_home() ) {
|
if ( is_front_page() && is_home() ) {
|
||||||
get_sidebar('hero');
|
get_sidebar( 'hero' );
|
||||||
|
|
||||||
get_sidebar('statichero');
|
get_sidebar( 'statichero' );
|
||||||
} else {
|
}
|
||||||
// Do nothing...or?
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper" id="wrapper-index">
|
<div class="wrapper" id="wrapper-index">
|
||||||
|
@ -43,7 +41,9 @@
|
||||||
<?php while ( have_posts() ) : the_post(); ?>
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* Include the Post-Format-specific template for the content.
|
|
||||||
|
/*
|
||||||
|
* Include the Post-Format-specific template for the content.
|
||||||
* If you want to override this in a child theme, then include a file
|
* 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.
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||||
*/
|
*/
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ): ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_sidebar( 'right' ); ?>
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- Container end -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- Wrapper end -->
|
||||||
|
|
||||||
|
|
7
page.php
7
page.php
|
@ -11,9 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$container = get_theme_mod( 'understrap_container_type' );
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
// On WooCommerce pages there is no need for sidebars as they leave
|
// On WooCommerce pages there is no need for sidebars as they leave
|
||||||
|
@ -28,7 +26,8 @@ if ( class_exists( 'WooCommerce' ) ) {
|
||||||
get_option( 'woocommerce_cart_page_id' ) == $this_page_id || get_option( 'woocommerce_checkout_page_id' ) == $this_page_id ||
|
get_option( 'woocommerce_cart_page_id' ) == $this_page_id || get_option( 'woocommerce_checkout_page_id' ) == $this_page_id ||
|
||||||
get_option( 'woocommerce_pay_page_id' ) == $this_page_id || get_option( 'woocommerce_thanks_page_id' ) === $this_page_id ||
|
get_option( 'woocommerce_pay_page_id' ) == $this_page_id || get_option( 'woocommerce_thanks_page_id' ) === $this_page_id ||
|
||||||
get_option( 'woocommerce_myaccount_page_id' ) == $this_page_id || get_option( 'woocommerce_edit_address_page_id' ) == $this_page_id ||
|
get_option( 'woocommerce_myaccount_page_id' ) == $this_page_id || get_option( 'woocommerce_edit_address_page_id' ) == $this_page_id ||
|
||||||
get_option( 'woocommerce_view_order_page_id' ) == $this_page_id || get_option( 'woocommerce_terms_page_id' ) == $this_page_id) {
|
get_option( 'woocommerce_view_order_page_id' ) == $this_page_id || get_option( 'woocommerce_terms_page_id' ) == $this_page_id
|
||||||
|
) {
|
||||||
|
|
||||||
$is_woocommerce = true;
|
$is_woocommerce = true;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +65,7 @@ if ( class_exists( 'WooCommerce' ) ) {
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php if ( !$is_woocommerce ) : get_sidebar( 'right' ); ?>
|
<?php if ( ! $is_woocommerce ) : get_sidebar( 'right' ); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
16
search.php
16
search.php
|
@ -5,11 +5,10 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
|
||||||
<?php
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
$container = get_theme_mod('understrap_container_type');
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper search-wrapper">
|
<div class="wrapper search-wrapper">
|
||||||
|
@ -27,7 +26,8 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
|
|
||||||
<header class="page-header">
|
<header class="page-header">
|
||||||
|
|
||||||
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'understrap' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
|
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'understrap' ),
|
||||||
|
'<span>' . get_search_query() . '</span>' ); ?></h1>
|
||||||
|
|
||||||
</header><!-- .page-header -->
|
</header><!-- .page-header -->
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ): ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_sidebar( 'right' ); ?>
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- Container end -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- Wrapper end -->
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,16 @@
|
||||||
*
|
*
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
|
?>
|
||||||
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
|
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
|
||||||
<label class="assistive-text" for="s"><?php _e( 'Search', 'understrap' ); ?></label>
|
<label class="assistive-text" for="s"><?php _e( 'Search', 'understrap' ); ?></label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="field form-control" id="s" name="s" type="text" placeholder="<?php esc_attr_e( 'Search …', 'understrap' ); ?>">
|
<input class="field form-control" id="s" name="s" type="text"
|
||||||
|
placeholder="<?php esc_attr_e( 'Search …', 'understrap' ); ?>">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<input class="submit btn btn-primary" id="searchsubmit" name="submit" type="submit" value="<?php esc_attr_e( 'Search', 'understrap' ); ?>">
|
<input class="submit btn btn-primary" id="searchsubmit" name="submit" type="submit"
|
||||||
|
value="<?php esc_attr_e( 'Search', 'understrap' ); ?>">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
<?php if ( is_active_sidebar( 'footerfull' ) ): ?>
|
<?php
|
||||||
|
/**
|
||||||
|
* Sidebar setup for footer full.
|
||||||
|
*
|
||||||
|
* @package understrap
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if ( is_active_sidebar( 'footerfull' ) ) : ?>
|
||||||
|
|
||||||
<!-- ******************* The Hero Widget Area ******************* -->
|
<!-- ******************* The Hero Widget Area ******************* -->
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,13 @@
|
||||||
<?php if ( is_active_sidebar( 'hero' ) ): ?>
|
<?php
|
||||||
|
/**
|
||||||
|
* Sidebar - hero setup.
|
||||||
|
*
|
||||||
|
* @package understrap
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if ( is_active_sidebar( 'hero' ) ) : ?>
|
||||||
|
|
||||||
<!-- ******************* The Hero Widget Area ******************* -->
|
<!-- ******************* The Hero Widget Area ******************* -->
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
<?php if ( is_active_sidebar( 'statichero' ) ): ?>
|
<?php
|
||||||
|
/**
|
||||||
|
* Static hero sidebar setup.
|
||||||
|
*
|
||||||
|
* @package understrap
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
<?php if ( is_active_sidebar( 'statichero' ) ) : ?>
|
||||||
|
|
||||||
<!-- ******************* The Hero Widget Area ******************* -->
|
<!-- ******************* The Hero Widget Area ******************* -->
|
||||||
|
|
||||||
|
|
15
single.php
15
single.php
|
@ -5,12 +5,9 @@
|
||||||
* @package understrap
|
* @package understrap
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
?>
|
$container = get_theme_mod( 'understrap_container_type' );
|
||||||
|
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||||
<?php
|
|
||||||
$container = get_theme_mod('understrap_container_type');
|
|
||||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrapper" id="single-wrapper">
|
<div class="wrapper" id="single-wrapper">
|
||||||
|
@ -31,7 +28,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
<?php the_post_navigation(); ?>
|
<?php the_post_navigation(); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// If comments are open or we have at least one comment, load up the comment template
|
// If comments are open or we have at least one comment, load up the comment template.
|
||||||
if ( comments_open() || get_comments_number() ) :
|
if ( comments_open() || get_comments_number() ) :
|
||||||
comments_template();
|
comments_template();
|
||||||
endif;
|
endif;
|
||||||
|
@ -44,7 +41,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
</div><!-- #primary -->
|
</div><!-- #primary -->
|
||||||
|
|
||||||
<!-- Do the right sidebar check -->
|
<!-- Do the right sidebar check -->
|
||||||
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ): ?>
|
<?php if ( 'right' === $sidebar_pos || 'both' === $sidebar_pos ) : ?>
|
||||||
|
|
||||||
<?php get_sidebar( 'right' ); ?>
|
<?php get_sidebar( 'right' ); ?>
|
||||||
|
|
||||||
|
@ -52,7 +49,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||||
|
|
||||||
</div><!-- .row -->
|
</div><!-- .row -->
|
||||||
|
|
||||||
</div><!-- Container end -->
|
</div><!-- Container end -->
|
||||||
|
|
||||||
</div><!-- Wrapper end -->
|
</div><!-- Wrapper end -->
|
||||||
|
|
||||||
|
|
Reference in New Issue