root files code format
This commit is contained in:
parent
92f662269c
commit
c4e5d495d4
12
404.php
12
404.php
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found).
|
||||
*
|
||||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header();
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper" id="404-wrapper">
|
||||
|
||||
|
@ -20,13 +21,15 @@
|
|||
|
||||
<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 -->
|
||||
|
||||
<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(); ?>
|
||||
|
||||
|
@ -56,7 +59,8 @@
|
|||
|
||||
<?php
|
||||
/* 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" );
|
||||
?>
|
||||
|
||||
|
|
14
archive.php
14
archive.php
|
@ -7,12 +7,12 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header();
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php
|
||||
$container = get_theme_mod('understrap_container_type');
|
||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||
?>
|
||||
|
||||
<?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
|
||||
/* 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
|
||||
* 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 -->
|
||||
|
||||
<!-- 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' ); ?>
|
||||
|
||||
|
@ -72,7 +74,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
|
||||
</div> <!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
31
author.php
31
author.php
|
@ -6,9 +6,10 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
get_header();
|
||||
$container = get_theme_mod('understrap_container_type');
|
||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||
|
||||
get_header();
|
||||
$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">
|
||||
|
||||
<?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 echo get_avatar($curauth->ID); ?>
|
||||
<?php echo get_avatar( $curauth->ID ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<dl>
|
||||
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
||||
<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 if ( ! empty( $curauth->user_description ) ) : ?>
|
||||
|
@ -47,7 +51,8 @@
|
|||
<?php endif; ?>
|
||||
</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 -->
|
||||
|
||||
|
@ -57,9 +62,11 @@
|
|||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<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 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>
|
||||
<?php endwhile; ?>
|
||||
|
||||
|
@ -80,7 +87,7 @@
|
|||
</div><!-- #primary -->
|
||||
|
||||
<!-- 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' ); ?>
|
||||
|
||||
|
@ -88,7 +95,7 @@
|
|||
|
||||
</div> <!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
39
comments.php
39
comments.php
|
@ -25,21 +25,25 @@ if ( post_password_required() ) {
|
|||
<?php if ( have_comments() ) : ?>
|
||||
<h2 class="comments-title">
|
||||
<?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>' );
|
||||
?>
|
||||
</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">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'understrap' ) ); ?></div>
|
||||
<?php } if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?></div>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
||||
'understrap' ) ); ?></div>
|
||||
<?php }
|
||||
if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
||||
'understrap' ) ); ?></div>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-above -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
<?php endif; // check for comment navigation. ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
|
@ -50,18 +54,21 @@ if ( post_password_required() ) {
|
|||
?>
|
||||
</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">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'understrap' ) );?></div>
|
||||
<?php } if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?></div>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments',
|
||||
'understrap' ) ); ?></div>
|
||||
<?php }
|
||||
if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →',
|
||||
'understrap' ) ); ?></div>
|
||||
<?php } ?>
|
||||
</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
|
||||
// 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
|
||||
/* Loads the comment-form.php template
|
||||
/* get_template_part('comment-form');
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
<?php comment_form(); // Render comments form. ?>
|
||||
|
||||
</div><!-- #comments -->
|
||||
|
|
19
footer.php
19
footer.php
|
@ -8,12 +8,12 @@
|
|||
*/
|
||||
|
||||
$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">
|
||||
|
||||
|
@ -24,9 +24,12 @@ $container = get_theme_mod('understrap_container_type');
|
|||
<footer class="site-footer" id="colophon" role="contentinfo">
|
||||
|
||||
<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>
|
||||
<?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' ) ); ?>)
|
||||
</div><!-- .site-info -->
|
||||
|
||||
|
@ -38,11 +41,11 @@ $container = get_theme_mod('understrap_container_type');
|
|||
|
||||
</div><!-- container end -->
|
||||
|
||||
</div><!-- wrapper end -->
|
||||
</div><!-- wrapper end -->
|
||||
|
||||
</div><!-- #page -->
|
||||
</div><!-- #page -->
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* understrap functions and definitions
|
||||
* Understrap functions and definitions
|
||||
*
|
||||
* @package understrap
|
||||
*/
|
||||
|
@ -18,8 +18,8 @@ require get_template_directory() . '/inc/setup.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';
|
||||
|
||||
/**
|
||||
|
@ -53,18 +53,18 @@ require get_template_directory() . '/inc/custom-comments.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';
|
||||
|
||||
/**
|
||||
* Load custom WordPress gallery.
|
||||
*/
|
||||
* Load custom WordPress gallery.
|
||||
*/
|
||||
require get_template_directory() . '/inc/bootstrap-wp-gallery.php';
|
||||
|
||||
/**
|
||||
* Load WooCommerce functions.
|
||||
*/
|
||||
* Load WooCommerce functions.
|
||||
*/
|
||||
require get_template_directory() . '/inc/woocommerce.php';
|
||||
|
||||
/**
|
||||
|
|
31
header.php
31
header.php
|
@ -6,10 +6,9 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
?>
|
||||
|
||||
<?php $container = get_theme_mod('understrap_container_type'); ?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
|
@ -18,7 +17,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="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="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
||||
<?php wp_head(); ?>
|
||||
|
@ -26,28 +26,35 @@
|
|||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<div class="hfeed site" id="page">
|
||||
<div class="hfeed site" id="page">
|
||||
|
||||
<!-- ******************* The Navbar Area ******************* -->
|
||||
<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="navbar-header">
|
||||
|
||||
<!-- .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 -->
|
||||
<?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' ) ); ?>">
|
||||
<?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' ) ); ?>">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
<?php } else { the_custom_logo(); } ?><!-- end custom logo -->
|
||||
<?php } else {
|
||||
the_custom_logo();
|
||||
} ?><!-- end custom logo -->
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -60,7 +67,7 @@
|
|||
'menu_class' => 'nav navbar-nav',
|
||||
'fallback_cb' => '',
|
||||
'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();
|
||||
|
||||
$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');
|
||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||
$posts_style = get_theme_mod( 'understrap_posts_index_style' );
|
||||
if ( is_front_page() && is_home() ) {
|
||||
get_sidebar( 'hero' );
|
||||
|
||||
if ( is_front_page() && is_home() ) {
|
||||
get_sidebar('hero');
|
||||
|
||||
get_sidebar('statichero');
|
||||
} else {
|
||||
// Do nothing...or?
|
||||
}
|
||||
get_sidebar( 'statichero' );
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="wrapper-home">
|
||||
|
|
24
index.php
24
index.php
|
@ -11,18 +11,16 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header();
|
||||
get_header();
|
||||
|
||||
$container = get_theme_mod('understrap_container_type');
|
||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||
|
||||
if ( is_front_page() && is_home() ) {
|
||||
get_sidebar('hero');
|
||||
if ( is_front_page() && is_home() ) {
|
||||
get_sidebar( 'hero' );
|
||||
|
||||
get_sidebar('statichero');
|
||||
} else {
|
||||
// Do nothing...or?
|
||||
}
|
||||
get_sidebar( 'statichero' );
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="wrapper-index">
|
||||
|
@ -43,7 +41,9 @@
|
|||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?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
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
|
@ -65,7 +65,7 @@
|
|||
</div><!-- #primary -->
|
||||
|
||||
<!-- 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' ); ?>
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
7
page.php
7
page.php
|
@ -11,9 +11,7 @@
|
|||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||
// 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_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_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;
|
||||
}
|
||||
|
@ -66,7 +65,7 @@ if ( class_exists( 'WooCommerce' ) ) {
|
|||
<!-- Do the right sidebar check -->
|
||||
<?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; ?>
|
||||
|
|
16
search.php
16
search.php
|
@ -5,11 +5,10 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
<?php
|
||||
$container = get_theme_mod('understrap_container_type');
|
||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||
get_header();
|
||||
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||
?>
|
||||
|
||||
<div class="wrapper search-wrapper">
|
||||
|
@ -27,7 +26,8 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
|
||||
<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 -->
|
||||
|
||||
|
@ -58,7 +58,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
</div><!-- #primary -->
|
||||
|
||||
<!-- 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' ); ?>
|
||||
|
||||
|
@ -66,7 +66,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
?>
|
||||
|
||||
?>
|
||||
<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>
|
||||
<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">
|
||||
<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>
|
||||
</div>
|
||||
</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 ******************* -->
|
||||
|
||||
|
|
|
@ -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 ******************* -->
|
||||
|
||||
|
|
|
@ -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 ******************* -->
|
||||
|
||||
|
|
15
single.php
15
single.php
|
@ -5,12 +5,9 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php
|
||||
$container = get_theme_mod('understrap_container_type');
|
||||
$sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
||||
get_header();
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="single-wrapper">
|
||||
|
@ -31,7 +28,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
<?php the_post_navigation(); ?>
|
||||
|
||||
<?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() ) :
|
||||
comments_template();
|
||||
endif;
|
||||
|
@ -44,7 +41,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
</div><!-- #primary -->
|
||||
|
||||
<!-- 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' ); ?>
|
||||
|
||||
|
@ -52,7 +49,7 @@ $sidebar_pos = get_theme_mod('understrap_sidebar_position');
|
|||
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
Reference in New Issue