Merge pull request #106 from maxdmyers/code-standards
Implement @mdo's code standards as per feature request You are great! Two thumb up 👍 👍 @maxdmyers
This commit is contained in:
commit
b8a5f0cc5a
84
404.php
84
404.php
|
@ -4,73 +4,75 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper" id="404-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<div class="content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<section class="error-404 not-found">
|
||||
<section class="error-404 not-found">
|
||||
|
||||
<header class="page-header">
|
||||
<header class="page-header">
|
||||
|
||||
<h1 class="page-title"><?php _e( 'Oops! That page can’t be found.', 'understrap' ); ?></h1>
|
||||
</header><!-- .page-header -->
|
||||
<h1 class="page-title"><?php _e( 'Oops! That page can’t be found.', 'understrap' ); ?></h1>
|
||||
|
||||
<div class="page-content">
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'understrap' ); ?></p>
|
||||
<div class="page-content">
|
||||
|
||||
<?php get_search_form(); ?>
|
||||
<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 the_widget( 'WP_Widget_Recent_Posts' ); ?>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php if ( understrap_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
|
||||
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
|
||||
|
||||
<div class="widget widget_categories">
|
||||
<?php if ( understrap_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
|
||||
|
||||
<h2 class="widget-title"><?php _e( 'Most Used Categories', 'understrap' ); ?></h2>
|
||||
<div class="widget widget_categories">
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
wp_list_categories( array(
|
||||
'orderby' => 'count',
|
||||
'order' => 'DESC',
|
||||
'show_count' => 1,
|
||||
'title_li' => '',
|
||||
'number' => 10,
|
||||
) );
|
||||
?>
|
||||
</ul>
|
||||
<h2 class="widget-title"><?php _e( 'Most Used Categories', 'understrap' ); ?></h2>
|
||||
|
||||
</div><!-- .widget -->
|
||||
<ul>
|
||||
<?php
|
||||
wp_list_categories( array(
|
||||
'orderby' => 'count',
|
||||
'order' => 'DESC',
|
||||
'show_count' => 1,
|
||||
'title_li' => '',
|
||||
'number' => 10,
|
||||
) );
|
||||
?>
|
||||
</ul>
|
||||
|
||||
<?php endif; ?>
|
||||
</div><!-- .widget -->
|
||||
|
||||
<?php
|
||||
/* translators: %1$s: smiley */
|
||||
$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" );
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
|
||||
<?php
|
||||
/* translators: %1$s: smiley */
|
||||
$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" );
|
||||
?>
|
||||
|
||||
</div><!-- .page-content -->
|
||||
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
|
||||
|
||||
</section><!-- .error-404 -->
|
||||
</div><!-- .page-content -->
|
||||
|
||||
</main><!-- #main -->
|
||||
</section><!-- .error-404 -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div> <!-- .row -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div> <!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
61
archive.php
61
archive.php
|
@ -7,57 +7,58 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="archive-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<?php
|
||||
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
||||
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
||||
?>
|
||||
</header><!-- .page-header -->
|
||||
<header class="page-header">
|
||||
<?php
|
||||
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
||||
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
||||
?>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* 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.
|
||||
*/
|
||||
get_template_part( 'loop-templates/content', get_post_format() );
|
||||
?>
|
||||
<?php
|
||||
/* 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.
|
||||
*/
|
||||
get_template_part( 'loop-templates/content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php the_posts_navigation(); ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div> <!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
93
author.php
93
author.php
|
@ -6,79 +6,80 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="author-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<header class="page-header author-header">
|
||||
<header class="page-header author-header">
|
||||
|
||||
<?php
|
||||
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
|
||||
?>
|
||||
<?php
|
||||
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
|
||||
?>
|
||||
|
||||
<h1><?php esc_html_e( 'About:', 'understrap' ); ?> <?php echo $curauth->nickname; ?></h1>
|
||||
<h1><?php esc_html_e( 'About:', 'understrap' ); ?> <?php echo $curauth->nickname; ?></h1>
|
||||
|
||||
<?php if ( ! empty( $curauth->ID ) ) : ?>
|
||||
<?php echo get_avatar($curauth->ID); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ( ! empty( $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 $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
|
||||
<?php endif; ?>
|
||||
<dl>
|
||||
<?php if ( ! empty( $curauth->user_url ) ) : ?>
|
||||
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
|
||||
<dd><a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a></dd>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! empty( $curauth->user_description ) ) : ?>
|
||||
<dt><?php esc_html_e( 'Profile', 'understrap' ); ?></dt>
|
||||
<dd><?php echo $curauth->user_description; ?></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
<?php if ( ! empty( $curauth->user_description ) ) : ?>
|
||||
<dt><?php esc_html_e( 'Profile', 'understrap' ); ?></dt>
|
||||
<dd><?php echo $curauth->user_description; ?></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
|
||||
<h2><?php esc_html_e( 'Posts by', 'understrap' ); ?> <?php echo $curauth->nickname; ?>:</h2>
|
||||
<h2><?php esc_html_e( 'Posts by', 'understrap' ); ?> <?php echo $curauth->nickname; ?>:</h2>
|
||||
|
||||
</header><!-- .page-header -->
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<ul>
|
||||
<!-- The Loop -->
|
||||
<ul>
|
||||
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<li>
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
|
||||
<?php the_title(); ?></a>,
|
||||
<?php the_time('d M Y'); ?> in <?php the_category('&');?>
|
||||
</li>
|
||||
<!-- The Loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<li>
|
||||
<a rel="bookmark" href="<?php the_permalink() ?>" title="Permanent Link: <?php the_title(); ?>">
|
||||
<?php the_title(); ?></a>,
|
||||
<?php the_time('d M Y'); ?> in <?php the_category('&');?>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php the_posts_navigation(); ?>
|
||||
<?php else : ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<!-- End Loop -->
|
||||
|
||||
<!-- End Loop -->
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
</main><!-- #main -->
|
||||
|
||||
</main><!-- #main -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div> <!-- .row -->
|
||||
|
||||
</div> <!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
106
comments.php
106
comments.php
|
@ -14,70 +14,70 @@
|
|||
* return early without loading the comments.
|
||||
*/
|
||||
if ( post_password_required() ) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area">
|
||||
<div class="comments-area" id="comments">
|
||||
|
||||
<?php // You can start editing here -- including this comment! ?>
|
||||
<?php // You can start editing here -- including this comment! ?>
|
||||
|
||||
<?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' ),
|
||||
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
|
||||
?>
|
||||
</h2>
|
||||
<?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' ),
|
||||
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 ?>
|
||||
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
|
||||
<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>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-above -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
<?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" role="navigation">
|
||||
<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>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-above -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
|
||||
<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>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-below -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
<?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" role="navigation">
|
||||
<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>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-below -->
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
<?php endif; // have_comments() ?>
|
||||
<?php endif; // have_comments() ?>
|
||||
|
||||
<?php
|
||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'understrap' ); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* Loads the comment-form.php template
|
||||
/* get_template_part('comment-form');
|
||||
*/
|
||||
?>
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'understrap' ); ?></p>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/* Loads the comment-form.php template
|
||||
/* get_template_part('comment-form');
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
</div><!-- #comments -->
|
||||
|
|
|
@ -4907,13 +4907,16 @@ a.text-gray-dark:focus, a.text-gray-dark:hover {
|
|||
#wrapper-hero {
|
||||
padding: 0px !important; }
|
||||
|
||||
.sticky, .gallery-caption, .bypostauthor {
|
||||
.sticky,
|
||||
.gallery-caption,
|
||||
.bypostauthor {
|
||||
font-size: inherit; }
|
||||
|
||||
.wrapper#wrapper-sticky {
|
||||
border-bottom: 1px solid #818a91; }
|
||||
|
||||
#wrapper-footer-full, #wrapper-static-hero {
|
||||
#wrapper-footer-full,
|
||||
#wrapper-static-hero {
|
||||
background-color: #eceeef; }
|
||||
|
||||
.wp-caption {
|
||||
|
@ -4939,13 +4942,17 @@ a.text-gray-dark:focus, a.text-gray-dark:hover {
|
|||
.entry-footer span {
|
||||
padding-right: 10px; }
|
||||
|
||||
img.wp-post-image, article img, figure, img, #secondary img {
|
||||
img.wp-post-image,
|
||||
article img,
|
||||
figure,
|
||||
img,
|
||||
#secondary img {
|
||||
max-width: 100%;
|
||||
height: auto; }
|
||||
|
||||
a.skip-link {
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 0px;
|
||||
right: 0px; }
|
||||
|
||||
|
@ -4954,9 +4961,14 @@ a.skip-link {
|
|||
|
||||
.menu-item {
|
||||
float: left;
|
||||
width: auto;
|
||||
display: inline; }
|
||||
display: inline;
|
||||
width: auto; }
|
||||
|
||||
/* Navbar toggle
|
||||
* Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
* JavaScript plugin.
|
||||
* Navbar vertical align
|
||||
*/
|
||||
.navbar-toggle {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -4964,7 +4976,10 @@ a.skip-link {
|
|||
padding: 9px 10px;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border: 1px solid transparent; }
|
||||
border: 1px solid transparent;
|
||||
/*
|
||||
* We remove the `outline` here, but later compensate by attaching `:hover` styles to `:focus`.
|
||||
*/ }
|
||||
.navbar-toggle:focus {
|
||||
outline: 0; }
|
||||
.navbar-toggle .icon-bar {
|
||||
|
@ -4975,9 +4990,10 @@ a.skip-link {
|
|||
.navbar-toggle .icon-bar + .icon-bar {
|
||||
margin-top: 4px; }
|
||||
|
||||
.navbar .collapsing, .navbar .collapse.in {
|
||||
width: 100%;
|
||||
float: left; }
|
||||
.navbar .collapsing,
|
||||
.navbar .collapse.in {
|
||||
float: left;
|
||||
width: 100%; }
|
||||
|
||||
.navbar-dark .navbar-toggle {
|
||||
border: 1px solid #fff; }
|
||||
|
@ -5005,19 +5021,19 @@ a.skip-link {
|
|||
margin-left: 0rem; }
|
||||
|
||||
.nav-link {
|
||||
margin-left: .425rem;
|
||||
margin-right: .425rem; }
|
||||
margin-right: .425rem;
|
||||
margin-left: .425rem; }
|
||||
|
||||
.dropdown-menu .dropdown-menu {
|
||||
position: relative;
|
||||
display: block;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
width: 140px;
|
||||
margin-left: 10px;
|
||||
width: 140px; }
|
||||
border: none;
|
||||
box-shadow: none; }
|
||||
.dropdown-menu .dropdown-menu li {
|
||||
list-style: square;
|
||||
padding-left: 0px; }
|
||||
padding-left: 0px;
|
||||
list-style: square; }
|
||||
|
||||
.dropdown-menu .menu-item {
|
||||
width: 100%; }
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
35
footer.php
35
footer.php
|
@ -6,41 +6,42 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
|
||||
$the_theme = wp_get_theme();
|
||||
?>
|
||||
|
||||
<?php get_sidebar('footerfull'); ?>
|
||||
<?php get_sidebar('footerfull'); ?>
|
||||
|
||||
<div class="wrapper" id="wrapper-footer">
|
||||
<div class="wrapper" id="wrapper-footer">
|
||||
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
|
||||
<footer id="colophon" class="site-footer" role="contentinfo">
|
||||
<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>
|
||||
<span class="sep"> | </span>
|
||||
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href="http://understrap.com/" rel="designer">understrap.com</a>' ); ?>
|
||||
(<?php printf( __( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ); ?>)
|
||||
</div><!-- .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>
|
||||
<span class="sep"> | </span>
|
||||
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a rel="designer" href="http://understrap.com/">understrap.com</a>' ); ?>
|
||||
(<?php printf( __( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ); ?>)
|
||||
</div><!-- .site-info -->
|
||||
|
||||
</footer><!-- #colophon -->
|
||||
</footer><!-- #colophon -->
|
||||
|
||||
</div><!--col end -->
|
||||
</div><!--col end -->
|
||||
|
||||
</div><!-- row end -->
|
||||
|
||||
</div><!-- container end -->
|
||||
</div><!-- container end -->
|
||||
|
||||
</div><!-- wrapper end -->
|
||||
</div><!-- wrapper end -->
|
||||
|
||||
</div><!-- #page -->
|
||||
</div><!-- #page -->
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ require get_template_directory() . '/inc/bootstrap-wp-navwalker.php';
|
|||
*/
|
||||
require get_template_directory() . '/inc/bootstrap-wp-gallery.php';
|
||||
|
||||
|
||||
/**
|
||||
* Load WooCommerce functions.
|
||||
*/
|
||||
|
|
86
header.php
86
header.php
|
@ -6,72 +6,62 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
?><!DOCTYPE html>
|
||||
?>
|
||||
<!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">
|
||||
<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'); ?>">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
||||
<?php wp_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">
|
||||
<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'); ?>">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<div id="page" class="hfeed site">
|
||||
<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="container">
|
||||
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
<button class="navbar-toggler hidden-sm-up" data-toggle="collapse" data-target=".exCollapsingNavbar" type="button" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">☰</button>
|
||||
|
||||
<div class="navbar-header">
|
||||
<!-- 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 bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
<?php } else { the_custom_logo(); } ?><!-- end custom logo -->
|
||||
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<!-- The WordPress Menu goes here -->
|
||||
<?php wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'primary',
|
||||
'container_class' => 'collapse navbar-toggleable-xs exCollapsingNavbar',
|
||||
'menu_class' => 'nav navbar-nav',
|
||||
'fallback_cb' => '',
|
||||
'menu_id' => 'main-menu',
|
||||
'walker' => new wp_bootstrap_navwalker()
|
||||
)
|
||||
); ?>
|
||||
|
||||
<!-- Your site title as branding in the menu -->
|
||||
<?php if (!has_custom_logo()) { ?>
|
||||
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
<?php } else { the_custom_logo(); } ?><!-- end custom logo -->
|
||||
</div> <!-- .container -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- The WordPress Menu goes here -->
|
||||
<?php wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'primary',
|
||||
'container_class' => 'collapse navbar-toggleable-xs exCollapsingNavbar',
|
||||
'menu_class' => 'nav navbar-nav',
|
||||
'fallback_cb' => '',
|
||||
'menu_id' => 'main-menu',
|
||||
'walker' => new wp_bootstrap_navwalker()
|
||||
)
|
||||
); ?>
|
||||
|
||||
</div> <!-- .container -->
|
||||
|
||||
</nav><!-- .site-navigation -->
|
||||
</nav><!-- .site-navigation -->
|
||||
|
||||
</div><!-- .wrapper-navbar end -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,124 +4,124 @@
|
|||
function bootstrap_wp_gallery( $output, $attr ) {
|
||||
|
||||
|
||||
// Initialize
|
||||
global $post, $wp_locale;
|
||||
// Initialize
|
||||
global $post, $wp_locale;
|
||||
|
||||
// Gallery instance counter
|
||||
static $instance = 0;
|
||||
$instance++;
|
||||
// Gallery instance counter
|
||||
static $instance = 0;
|
||||
$instance++;
|
||||
|
||||
// Validate the author's orderby attribute
|
||||
if ( isset( $attr['orderby'] ) ) {
|
||||
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
|
||||
if ( ! $attr['orderby'] ) unset( $attr['orderby'] );
|
||||
}
|
||||
// Validate the author's orderby attribute
|
||||
if ( isset( $attr['orderby'] ) ) {
|
||||
$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
|
||||
if ( ! $attr['orderby'] ) unset( $attr['orderby'] );
|
||||
}
|
||||
|
||||
// Get attributes from shortcode
|
||||
extract( shortcode_atts( array(
|
||||
'order' => 'ASC',
|
||||
'orderby' => 'menu_order ID',
|
||||
'id' => $post->ID,
|
||||
'itemtag' => 'div',
|
||||
'icontag' => 'div',
|
||||
'captiontag' => 'div',
|
||||
'columns' => 3,
|
||||
'size' => 'thumbnail',
|
||||
'exclude' => ''
|
||||
), $attr ) );
|
||||
// Get attributes from shortcode
|
||||
extract( shortcode_atts( array(
|
||||
'order' => 'ASC',
|
||||
'orderby' => 'menu_order ID',
|
||||
'id' => $post->ID,
|
||||
'itemtag' => 'div',
|
||||
'icontag' => 'div',
|
||||
'captiontag' => 'div',
|
||||
'columns' => 3,
|
||||
'size' => 'thumbnail',
|
||||
'exclude' => ''
|
||||
), $attr ) );
|
||||
|
||||
// Initialize
|
||||
$id = intval( $id );
|
||||
$attachments = array();
|
||||
if ( $order == 'RAND' ) $orderby = 'none';
|
||||
// Initialize
|
||||
$id = intval( $id );
|
||||
$attachments = array();
|
||||
if ( $order == 'RAND' ) $orderby = 'none';
|
||||
|
||||
|
||||
if ( ! empty( $include ) ) {
|
||||
if ( ! empty( $include ) ) {
|
||||
|
||||
// Include attribute is present
|
||||
$include = preg_replace( '/[^0-9,]+/', '', $include );
|
||||
$_attachments = get_posts( array( 'include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );
|
||||
// Include attribute is present
|
||||
$include = preg_replace( '/[^0-9,]+/', '', $include );
|
||||
$_attachments = get_posts( array( 'include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );
|
||||
|
||||
// Setup attachments array
|
||||
foreach ( $_attachments as $key => $val ) {
|
||||
$attachments[ $val->ID ] = $_attachments[ $key ];
|
||||
}
|
||||
// Setup attachments array
|
||||
foreach ( $_attachments as $key => $val ) {
|
||||
$attachments[ $val->ID ] = $_attachments[ $key ];
|
||||
}
|
||||
|
||||
} else if ( ! empty( $exclude ) ) {
|
||||
} else if ( ! empty( $exclude ) ) {
|
||||
|
||||
// Exclude attribute is present
|
||||
$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );
|
||||
// Exclude attribute is present
|
||||
$exclude = preg_replace( '/[^0-9,]+/', '', $exclude );
|
||||
|
||||
// Setup attachments array
|
||||
$attachments = get_children( array( 'post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );
|
||||
} else {
|
||||
// Setup attachments array
|
||||
$attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );
|
||||
}
|
||||
// Setup attachments array
|
||||
$attachments = get_children( array( 'post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );
|
||||
} else {
|
||||
// Setup attachments array
|
||||
$attachments = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby ) );
|
||||
}
|
||||
|
||||
if ( empty( $attachments ) ) return '';
|
||||
if ( empty( $attachments ) ) return '';
|
||||
|
||||
// Filter gallery differently for feeds
|
||||
if ( is_feed() ) {
|
||||
$output = "\n";
|
||||
foreach ( $attachments as $att_id => $attachment ) $output .= wp_get_attachment_link( $att_id, $size, true ) . "\n";
|
||||
return $output;
|
||||
}
|
||||
// Filter gallery differently for feeds
|
||||
if ( is_feed() ) {
|
||||
$output = "\n";
|
||||
foreach ( $attachments as $att_id => $attachment ) $output .= wp_get_attachment_link( $att_id, $size, true ) . "\n";
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Filter tags and attributes
|
||||
$itemtag = tag_escape( $itemtag );
|
||||
$captiontag = tag_escape( $captiontag );
|
||||
$columns = intval( $columns );
|
||||
$itemwidth = $columns > 0 ? floor( 12 / $columns ) : 100;
|
||||
$float = is_rtl() ? 'right' : 'left';
|
||||
$selector = "gallery-{$instance}";
|
||||
// Filter tags and attributes
|
||||
$itemtag = tag_escape( $itemtag );
|
||||
$captiontag = tag_escape( $captiontag );
|
||||
$columns = intval( $columns );
|
||||
$itemwidth = $columns > 0 ? floor( 12 / $columns ) : 100;
|
||||
$float = is_rtl() ? 'right' : 'left';
|
||||
$selector = "gallery-{$instance}";
|
||||
|
||||
// Filter gallery CSS
|
||||
$output = apply_filters( 'gallery_style', "
|
||||
$output = apply_filters( 'gallery_style', "
|
||||
|
||||
<div id='$selector' class='gallery galleryid-{$id} row'>"
|
||||
);
|
||||
<div class='gallery galleryid-{$id} row' id='$selector'>"
|
||||
);
|
||||
|
||||
// Iterate through the attachments in this gallery instance
|
||||
$i = 0;
|
||||
foreach ( $attachments as $id => $attachment ) {
|
||||
// Iterate through the attachments in this gallery instance
|
||||
$i = 0;
|
||||
foreach ( $attachments as $id => $attachment ) {
|
||||
|
||||
// Attachment link
|
||||
$link = isset( $attr['link'] ) && 'file' == $attr['link'] ? wp_get_attachment_link( $id, $size, false, false ) : wp_get_attachment_link( $id, $size, true, false );
|
||||
// Attachment link
|
||||
$link = isset( $attr['link'] ) && 'file' == $attr['link'] ? wp_get_attachment_link( $id, $size, false, false ) : wp_get_attachment_link( $id, $size, true, false );
|
||||
|
||||
// Start itemtag
|
||||
$output .= "<{$itemtag} class='gallery-item col-md-{$itemwidth}'>";
|
||||
// Start itemtag
|
||||
$output .= "<{$itemtag} class='gallery-item col-md-{$itemwidth}'>";
|
||||
|
||||
// icontag
|
||||
$output .= "
|
||||
<{$icontag} class='gallery-icon'>
|
||||
$link
|
||||
</{$icontag}>";
|
||||
// icontag
|
||||
$output .= "
|
||||
<{$icontag} class='gallery-icon'>
|
||||
$link
|
||||
</{$icontag}>";
|
||||
|
||||
if ( $captiontag && trim( $attachment->post_excerpt ) ) {
|
||||
if ( $captiontag && trim( $attachment->post_excerpt ) ) {
|
||||
|
||||
// captiontag
|
||||
$output .= "
|
||||
<{$captiontag} class='gallery-caption'>
|
||||
" . wptexturize($attachment->post_excerpt) . "
|
||||
</{$captiontag}>";
|
||||
// captiontag
|
||||
$output .= "
|
||||
<{$captiontag} class='gallery-caption'>
|
||||
" . wptexturize($attachment->post_excerpt) . "
|
||||
</{$captiontag}>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// End itemtag
|
||||
$output .= "</{$itemtag}>";
|
||||
// End itemtag
|
||||
$output .= "</{$itemtag}>";
|
||||
|
||||
// Line breaks by columns set
|
||||
if($columns > 0 && ++$i % $columns == 0) $output .= '<br style="clear: both">';
|
||||
// Line breaks by columns set
|
||||
if($columns > 0 && ++$i % $columns == 0) $output .= '<br style="clear: both">';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// End gallery output
|
||||
$output .= "
|
||||
<br style='clear: both;'>
|
||||
</div>\n";
|
||||
// End gallery output
|
||||
$output .= "
|
||||
<br style='clear: both;'>
|
||||
</div>\n";
|
||||
|
||||
return $output;
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,126 +18,126 @@
|
|||
//exit if accessed directly
|
||||
if(!defined('ABSPATH')) exit;
|
||||
class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
||||
/**
|
||||
* @see Walker::start_lvl()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param int $depth Depth of page. Used for padding.
|
||||
*/
|
||||
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
$indent = str_repeat( "\t", $depth );
|
||||
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
|
||||
}
|
||||
/**
|
||||
* @see Walker::start_el()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $item Menu item data object.
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
* @param int $current_page Menu item ID.
|
||||
* @param object $args
|
||||
*/
|
||||
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||
/**
|
||||
* Dividers, Headers or Disabled
|
||||
* =============================
|
||||
* Determine whether the item is a Divider, Header, Disabled or regular
|
||||
* menu item. To prevent errors we use the strcasecmp() function to so a
|
||||
* comparison that is not case sensitive. The strcasecmp() function returns
|
||||
* a 0 if the strings are equal.
|
||||
*/
|
||||
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
} else if ( strcasecmp( $item->title, 'divider') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title );
|
||||
} else if ( strcasecmp($item->attr_title, 'disabled' ) == 0 ) {
|
||||
$output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
} else {
|
||||
$class_names = $value = '';
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
$classes[] = 'nav-item menu-item-' . $item->ID;
|
||||
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||
/*
|
||||
if ( $args->has_children )
|
||||
$class_names .= ' dropdown';
|
||||
*/
|
||||
if($args->has_children && $depth === 0) { $class_names .= ' dropdown'; } elseif($args->has_children && $depth > 0) { $class_names .= ' dropdown-submenu'; }
|
||||
if ( in_array( 'current-menu-item', $classes ) )
|
||||
$class_names .= ' active';
|
||||
// remove Font Awesome icon from classes array and save the icon
|
||||
// we will add the icon back in via a <span> below so it aligns with
|
||||
// the menu item
|
||||
if ( in_array('fa', $classes)) {
|
||||
$key = array_search('fa', $classes);
|
||||
$icon = $classes[$key + 1];
|
||||
$class_names = str_replace($classes[$key+1], '', $class_names);
|
||||
$class_names = str_replace($classes[$key], '', $class_names);
|
||||
}
|
||||
/**
|
||||
* @see Walker::start_lvl()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param int $depth Depth of page. Used for padding.
|
||||
*/
|
||||
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
$indent = str_repeat( "\t", $depth );
|
||||
$output .= "\n$indent<ul class=\" dropdown-menu\" role=\"menu\">\n";
|
||||
}
|
||||
/**
|
||||
* @see Walker::start_el()
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @param object $item Menu item data object.
|
||||
* @param int $depth Depth of menu item. Used for padding.
|
||||
* @param int $current_page Menu item ID.
|
||||
* @param object $args
|
||||
*/
|
||||
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||
/**
|
||||
* Dividers, Headers or Disabled
|
||||
* =============================
|
||||
* Determine whether the item is a Divider, Header, Disabled or regular
|
||||
* menu item. To prevent errors we use the strcasecmp() function to so a
|
||||
* comparison that is not case sensitive. The strcasecmp() function returns
|
||||
* a 0 if the strings are equal.
|
||||
*/
|
||||
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li class="divider" role="presentation">';
|
||||
} else if ( strcasecmp( $item->title, 'divider') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li class="divider" role="presentation">';
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_attr( $item->title );
|
||||
} else if ( strcasecmp($item->attr_title, 'disabled' ) == 0 ) {
|
||||
$output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
} else {
|
||||
$class_names = $value = '';
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
$classes[] = 'nav-item menu-item-' . $item->ID;
|
||||
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||
/*
|
||||
if ( $args->has_children )
|
||||
$class_names .= ' dropdown';
|
||||
*/
|
||||
if($args->has_children && $depth === 0) { $class_names .= ' dropdown'; } elseif($args->has_children && $depth > 0) { $class_names .= ' dropdown-submenu'; }
|
||||
if ( in_array( 'current-menu-item', $classes ) )
|
||||
$class_names .= ' active';
|
||||
// remove Font Awesome icon from classes array and save the icon
|
||||
// we will add the icon back in via a <span> below so it aligns with
|
||||
// the menu item
|
||||
if ( in_array('fa', $classes)) {
|
||||
$key = array_search('fa', $classes);
|
||||
$icon = $classes[$key + 1];
|
||||
$class_names = str_replace($classes[$key+1], '', $class_names);
|
||||
$class_names = str_replace($classes[$key], '', $class_names);
|
||||
}
|
||||
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
$output .= $indent . '<li' . $id . $value . $class_names .'>';
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $item->title ) ? $item->title : '';
|
||||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||
// If item has_children add atts to a.
|
||||
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||
$output .= $indent . '<li' . $id . $value . $class_names .'>';
|
||||
$atts = array();
|
||||
$atts['title'] = ! empty( $item->title ) ? $item->title : '';
|
||||
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
|
||||
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
|
||||
// If item has_children add atts to a.
|
||||
|
||||
if ( $args->has_children && $depth === 0 ) {
|
||||
$atts['href'] = '#';
|
||||
$atts['data-toggle'] = 'dropdown';
|
||||
$atts['class'] = 'nav-link dropdown-toggle';
|
||||
} else {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['class'] = 'nav-link';
|
||||
}
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( ! empty( $value ) ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$item_output = $args->before;
|
||||
// Font Awesome icons
|
||||
if ( ! empty( $icon ) )
|
||||
$item_output .= '<a'. $attributes .'><span class="fa ' . esc_attr( $icon ) . '"></span> ';
|
||||
else
|
||||
$item_output .= '<a'. $attributes .'>';
|
||||
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
|
||||
$item_output .= ( $args->has_children && 0 === $depth ) ? ' <span class="caret"></span></a>' : '</a>';
|
||||
$item_output .= $args->after;
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Traverse elements to create list from elements.
|
||||
*
|
||||
* Display one element if the element doesn't have any children otherwise,
|
||||
* display the element and its children. Will only traverse up to the max
|
||||
* depth and no ignore elements under that depth.
|
||||
*
|
||||
* This method shouldn't be called directly, use the walk() method instead.
|
||||
*
|
||||
* @see Walker::start_el()
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param object $element Data object
|
||||
* @param array $children_elements List of elements to continue traversing.
|
||||
* @param int $max_depth Max depth to traverse.
|
||||
* @param int $depth Depth of current element.
|
||||
* @param array $args
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @return null Null on failure with no changes to parameters.
|
||||
*/
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
|
||||
if ( $args->has_children && $depth === 0 ) {
|
||||
$atts['href'] = '#';
|
||||
$atts['data-toggle'] = 'dropdown';
|
||||
$atts['class'] = 'nav-link dropdown-toggle';
|
||||
} else {
|
||||
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
|
||||
$atts['class'] = 'nav-link';
|
||||
}
|
||||
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args );
|
||||
$attributes = '';
|
||||
foreach ( $atts as $attr => $value ) {
|
||||
if ( ! empty( $value ) ) {
|
||||
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
|
||||
$attributes .= ' ' . $attr . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
$item_output = $args->before;
|
||||
// Font Awesome icons
|
||||
if ( ! empty( $icon ) )
|
||||
$item_output .= '<a'. $attributes .'><span class="fa ' . esc_attr( $icon ) . '"></span> ';
|
||||
else
|
||||
$item_output .= '<a'. $attributes .'>';
|
||||
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
|
||||
$item_output .= ( $args->has_children && 0 === $depth ) ? ' <span class="caret"></span></a>' : '</a>';
|
||||
$item_output .= $args->after;
|
||||
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Traverse elements to create list from elements.
|
||||
*
|
||||
* Display one element if the element doesn't have any children otherwise,
|
||||
* display the element and its children. Will only traverse up to the max
|
||||
* depth and no ignore elements under that depth.
|
||||
*
|
||||
* This method shouldn't be called directly, use the walk() method instead.
|
||||
*
|
||||
* @see Walker::start_el()
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param object $element Data object
|
||||
* @param array $children_elements List of elements to continue traversing.
|
||||
* @param int $max_depth Max depth to traverse.
|
||||
* @param int $depth Depth of current element.
|
||||
* @param array $args
|
||||
* @param string $output Passed by reference. Used to append additional content.
|
||||
* @return null Null on failure with no changes to parameters.
|
||||
*/
|
||||
public function display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output ) {
|
||||
if ( ! $element )
|
||||
return;
|
||||
$id_field = $this->db_fields['id'];
|
||||
|
@ -146,41 +146,40 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
|||
$args[0]->has_children = ! empty( $children_elements[ $element->$id_field ] );
|
||||
parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
|
||||
}
|
||||
/**
|
||||
* Menu Fallback
|
||||
* =============
|
||||
* If this function is assigned to the wp_nav_menu's fallback_cb variable
|
||||
* and a manu has not been assigned to the theme location in the WordPress
|
||||
* menu manager the function with display nothing to a non-logged in user,
|
||||
* and will add a link to the WordPress menu manager if logged in as an admin.
|
||||
*
|
||||
* @param array $args passed from the wp_nav_menu function.
|
||||
*
|
||||
*/
|
||||
public static function fallback( $args ) {
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
extract( $args );
|
||||
$fb_output = null;
|
||||
if ( $container ) {
|
||||
$fb_output = '<' . $container;
|
||||
if ( $container_id )
|
||||
$fb_output .= ' id="' . $container_id . '"';
|
||||
if ( $container_class )
|
||||
$fb_output .= ' class="' . $container_class . '"';
|
||||
$fb_output .= '>';
|
||||
}
|
||||
$fb_output .= '<ul';
|
||||
if ( $menu_id )
|
||||
$fb_output .= ' id="' . $menu_id . '"';
|
||||
if ( $menu_class )
|
||||
$fb_output .= ' class="' . $menu_class . '"';
|
||||
$fb_output .= '>';
|
||||
$fb_output .= '<li><a href="' . admin_url( 'nav-menus.php' ) . '">Add a menu</a></li>';
|
||||
$fb_output .= '</ul>';
|
||||
if ( $container )
|
||||
$fb_output .= '</' . $container . '>';
|
||||
echo $fb_output;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Menu Fallback
|
||||
* =============
|
||||
* If this function is assigned to the wp_nav_menu's fallback_cb variable
|
||||
* and a manu has not been assigned to the theme location in the WordPress
|
||||
* menu manager the function with display nothing to a non-logged in user,
|
||||
* and will add a link to the WordPress menu manager if logged in as an admin.
|
||||
*
|
||||
* @param array $args passed from the wp_nav_menu function.
|
||||
*
|
||||
*/
|
||||
public static function fallback( $args ) {
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
extract( $args );
|
||||
$fb_output = null;
|
||||
if ( $container ) {
|
||||
$fb_output = '<' . $container;
|
||||
if ( $container_class )
|
||||
$fb_output .= ' class="' . $container_class . '"';
|
||||
if ( $container_id )
|
||||
$fb_output .= ' id="' . $container_id . '"';
|
||||
$fb_output .= '>';
|
||||
}
|
||||
$fb_output .= '<ul';
|
||||
if ( $menu_class )
|
||||
$fb_output .= ' class="' . $menu_class . '"';
|
||||
if ( $menu_id )
|
||||
$fb_output .= ' id="' . $menu_id . '"';
|
||||
$fb_output .= '>';
|
||||
$fb_output .= '<li><a href="' . admin_url( 'nav-menus.php' ) . '">Add a menu</a></li>';
|
||||
$fb_output .= '</ul>';
|
||||
if ( $container )
|
||||
$fb_output .= '</' . $container . '>';
|
||||
echo $fb_output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
$html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0;
|
||||
$fields = array(
|
||||
'author' => '<div class="form-group comment-form-author">' . '<label for="author">' . __( 'Name', 'understrap' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div>',
|
||||
'<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '></div>',
|
||||
'email' => '<div class="form-group comment-form-email"><label for="email">' . __( 'Email', 'understrap' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div>',
|
||||
'<input class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . '></div>',
|
||||
'url' => '<div class="form-group comment-form-url"><label for="url">' . __( 'Website', 'understrap' ) . '</label> ' .
|
||||
'<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></div>',
|
||||
'<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></div>',
|
||||
);
|
||||
return $fields;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
|||
function bootstrap3_comment_form( $args ) {
|
||||
$args['comment_field'] = '<div class="form-group comment-form-comment">
|
||||
<label for="comment">' . _x( 'Comment', 'noun', 'understrap' ) . ( ' <span class="required">*</span>' ) . '</label>
|
||||
<textarea class="form-control" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>
|
||||
<textarea class="form-control" id="comment" name="comment" aria-required="true" cols="45" rows="8"></textarea>
|
||||
</div>';
|
||||
$args['class_submit'] = 'btn btn-secondary'; // since WP 4.1
|
||||
return $args;
|
||||
|
|
69
index.php
69
index.php
|
@ -11,64 +11,61 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && is_home() ) {
|
||||
if ( is_front_page() && is_home() ) {
|
||||
get_sidebar('hero');
|
||||
|
||||
get_sidebar('hero');
|
||||
|
||||
get_sidebar('statichero');
|
||||
|
||||
} else {
|
||||
get_sidebar('statichero');
|
||||
} else {
|
||||
// Do nothing...or?
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="wrapper-index">
|
||||
<div class="wrapper" id="wrapper-index">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php /* Start the Loop */ ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/* 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.
|
||||
*/
|
||||
get_template_part( 'loop-templates/content', get_post_format() );
|
||||
?>
|
||||
<?php
|
||||
/* 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.
|
||||
*/
|
||||
get_template_part( 'loop-templates/content', get_post_format() );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php the_posts_navigation(); ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
|
|
@ -6,5 +6,4 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
|
|
@ -6,5 +6,4 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
|
|
@ -9,33 +9,33 @@
|
|||
|
||||
?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<article class="post no-results not-found" id="post-0">
|
||||
|
||||
<header class="page-header">
|
||||
<header class="page-header">
|
||||
|
||||
<h2 class="page-title"><?php _e( 'Nothing Found', 'understrap' ); ?></h2>
|
||||
<h2 class="page-title"><?php _e( 'Nothing Found', 'understrap' ); ?></h2>
|
||||
|
||||
</header><!-- .page-header -->
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content">
|
||||
<div class="page-content">
|
||||
|
||||
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
|
||||
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'understrap' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
||||
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'understrap' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
|
||||
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
|
||||
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'understrap' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'understrap' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'understrap' ); ?></p>
|
||||
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'understrap' ); ?></p>
|
||||
|
||||
<?php get_search_form(); ?>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- .page-content -->
|
||||
</div><!-- .page-content -->
|
||||
|
||||
</article><!-- .no-results -->
|
||||
|
|
|
@ -6,33 +6,33 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
<header class="entry-header">
|
||||
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="entry-content">
|
||||
|
||||
<?php the_content(); ?>
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<footer class="entry-footer">
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
|
||||
</footer><!-- .entry-footer -->
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-## -->
|
||||
|
|
|
@ -4,34 +4,34 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
<header class="entry-header">
|
||||
|
||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
<?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() ) : ?>
|
||||
<?php if ( 'post' == get_post_type() ) : ?>
|
||||
|
||||
<div class="entry-meta">
|
||||
<div class="entry-meta">
|
||||
|
||||
<?php understrap_posted_on(); ?>
|
||||
<?php understrap_posted_on(); ?>
|
||||
|
||||
</div><!-- .entry-meta -->
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-summary">
|
||||
<div class="entry-summary">
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
</div><!-- .entry-summary -->
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<footer class="entry-footer">
|
||||
|
||||
<?php understrap_entry_footer(); ?>
|
||||
<?php understrap_entry_footer(); ?>
|
||||
|
||||
</footer><!-- .entry-footer -->
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-## -->
|
||||
|
|
|
@ -4,39 +4,39 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
<header class="entry-header">
|
||||
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
|
||||
<div class="entry-meta">
|
||||
<div class="entry-meta">
|
||||
|
||||
<?php understrap_posted_on(); ?>
|
||||
<?php understrap_posted_on(); ?>
|
||||
|
||||
</div><!-- .entry-meta -->
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="entry-content">
|
||||
|
||||
<?php the_content(); ?>
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<footer class="entry-footer">
|
||||
|
||||
<?php understrap_entry_footer(); ?>
|
||||
<?php understrap_entry_footer(); ?>
|
||||
|
||||
</footer><!-- .entry-footer -->
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-## -->
|
||||
|
|
|
@ -8,33 +8,33 @@
|
|||
|
||||
<?php global $post ?>
|
||||
|
||||
<article id="<?php echo strtolower( $post->post_title ); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="<?php echo strtolower( $post->post_title ); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
<header class="entry-header">
|
||||
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?>
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="entry-content">
|
||||
|
||||
<?php the_content(); ?>
|
||||
<?php the_content(); ?>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<footer class="entry-footer">
|
||||
|
||||
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
<?php edit_post_link( __( 'Edit', 'understrap' ), '<span class="edit-link">', '</span>' ); ?>
|
||||
|
||||
</footer><!-- .entry-footer -->
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-## -->
|
||||
|
|
|
@ -4,43 +4,43 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
<header class="entry-header">
|
||||
|
||||
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
<?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() ) : ?>
|
||||
<?php if ( 'post' == get_post_type() ) : ?>
|
||||
|
||||
<div class="entry-meta">
|
||||
<?php understrap_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<div class="entry-meta">
|
||||
<?php understrap_posted_on(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="entry-content">
|
||||
|
||||
<?php
|
||||
the_excerpt();
|
||||
?>
|
||||
<?php
|
||||
the_excerpt();
|
||||
?>
|
||||
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
<?php
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . __( 'Pages:', 'understrap' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer">
|
||||
<footer class="entry-footer">
|
||||
|
||||
<?php understrap_entry_footer(); ?>
|
||||
<?php understrap_entry_footer(); ?>
|
||||
|
||||
</footer><!-- .entry-footer -->
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
</article><!-- #post-## -->
|
|
@ -7,10 +7,9 @@
|
|||
* @package understrap
|
||||
*/
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<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">
|
||||
|
@ -20,13 +19,13 @@
|
|||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
|
||||
<?php get_template_part('loop-templates/content', 'blank'); ?>
|
||||
<?php get_template_part('loop-templates/content', 'blank'); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
<?php wp_footer();?>
|
||||
</body>
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
<?php wp_footer();?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'empty' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'empty' ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
<?php get_footer(); ?>
|
|
@ -7,36 +7,37 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="full-width-page-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div id="primary" class="col-md-12 content-area">
|
||||
<div class="col-md-12 content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'page' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'page' ); ?>
|
||||
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
|
||||
comments_template();
|
||||
comments_template();
|
||||
|
||||
endif;
|
||||
?>
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
|
@ -7,46 +7,46 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?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 );
|
||||
$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 );
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="full-width-page-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div id="primary" class="col-md-12 content-area">
|
||||
<div class="col-md-12 content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ): while ( $qry->have_posts() ): $qry->the_post() ?>
|
||||
<div class="page">
|
||||
<?php get_template_part( 'loop-templates/content', 'verticalpage' ); ?>
|
||||
</div>
|
||||
<?php if ( have_posts() ): while ( $qry->have_posts() ): $qry->the_post() ?>
|
||||
<div class="page">
|
||||
<?php get_template_part( 'loop-templates/content', 'verticalpage' ); ?>
|
||||
</div>
|
||||
|
||||
<?php wp_reset_postdata(); //reset custom query?>
|
||||
<?php endwhile; endif; ?>
|
||||
<?php wp_reset_postdata(); //reset custom query?>
|
||||
<?php endwhile; endif; ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
39
page.php
39
page.php
|
@ -10,40 +10,41 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="page-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'page' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'page' ); ?>
|
||||
|
||||
<?php
|
||||
// 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;
|
||||
?>
|
||||
<?php
|
||||
// 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;
|
||||
?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
|
@ -1,93 +1,76 @@
|
|||
// Some basic padding for all wrappers
|
||||
.wrapper {
|
||||
padding:$grid-gutter-width-base 0;
|
||||
}
|
||||
.wrapper { padding: $grid-gutter-width-base 0; }
|
||||
|
||||
// Reset hero wrapper padding to 0
|
||||
#wrapper-hero {
|
||||
padding:0px!important;
|
||||
}
|
||||
#wrapper-hero { padding: 0px !important; }
|
||||
|
||||
// Adding basic Wordpress classes to pass the Wordpress.org tests
|
||||
.sticky, .gallery-caption, .bypostauthor {
|
||||
font-size:inherit;
|
||||
}
|
||||
.sticky,
|
||||
.gallery-caption,
|
||||
.bypostauthor { font-size: inherit; }
|
||||
|
||||
// Separate sticky wrapper from main content
|
||||
.wrapper#wrapper-sticky {
|
||||
border-bottom:1px solid $gray-light;
|
||||
}
|
||||
.wrapper#wrapper-sticky { border-bottom: 1px solid $gray-light; }
|
||||
|
||||
// Adding some contrast background color to footer full widget
|
||||
#wrapper-footer-full, #wrapper-static-hero{
|
||||
background-color: $gray-lighter;
|
||||
}
|
||||
#wrapper-footer-full,
|
||||
#wrapper-static-hero { background-color: $gray-lighter; }
|
||||
|
||||
// Necessary WP classes
|
||||
.wp-caption {
|
||||
font-size: inherit;
|
||||
}
|
||||
.wp-caption { font-size: inherit; }
|
||||
|
||||
.wp-caption-text {
|
||||
font-size: inherit;
|
||||
}
|
||||
.wp-caption-text { font-size: inherit; }
|
||||
|
||||
.screen-reader-text {
|
||||
font-size: inherit;
|
||||
}
|
||||
.screen-reader-text { font-size: inherit; }
|
||||
|
||||
.alignright {
|
||||
float: right;
|
||||
padding-left:10px;
|
||||
float: right;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.alignleft {
|
||||
float: left;
|
||||
padding-right:10px;
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.aligncenter {
|
||||
margin:0px auto;
|
||||
}
|
||||
.aligncenter { margin: 0px auto; }
|
||||
|
||||
//Post design
|
||||
.entry-footer span {
|
||||
padding-right:10px;
|
||||
}
|
||||
// Post design
|
||||
.entry-footer span { padding-right: 10px; }
|
||||
|
||||
//Limit featured image size to 100%
|
||||
img.wp-post-image, article img, figure, img, #secondary img {
|
||||
max-width: 100%;
|
||||
// Limit featured image size to 100%
|
||||
img.wp-post-image,
|
||||
article img,
|
||||
figure,
|
||||
img,
|
||||
#secondary img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Skip to content link
|
||||
a.skip-link{
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
a.skip-link {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
// Reset Jumbotron default margin
|
||||
.jumbotron {
|
||||
margin-bottom:0px;
|
||||
.jumbotron { margin-bottom: 0px; }
|
||||
|
||||
// Bootstrap3 to Bootstrap4 "translation"
|
||||
.menu-item {
|
||||
float: left;
|
||||
display: inline;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
//Bootstrap3 to Bootstrap4 "translation"
|
||||
.menu-item {float:left; width:auto; display:inline;}
|
||||
//ul.nav.navbar-nav a {
|
||||
// display: block;
|
||||
// padding-top: .425rem;
|
||||
// padding-bottom: .425rem;
|
||||
//}
|
||||
|
||||
// Navbar toggle
|
||||
//
|
||||
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
// JavaScript plugin.
|
||||
// Navbar vertical align
|
||||
|
||||
/* Navbar toggle
|
||||
* Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
* JavaScript plugin.
|
||||
* Navbar vertical align
|
||||
*/
|
||||
.navbar-toggle {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -97,12 +80,10 @@ right: 0px;
|
|||
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
||||
border: 1px solid transparent;
|
||||
|
||||
|
||||
// We remove the `outline` here, but later compensate by attaching `:hover`
|
||||
// styles to `:focus`.
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
/*
|
||||
* We remove the `outline` here, but later compensate by attaching `:hover` styles to `:focus`.
|
||||
*/
|
||||
&:focus { outline: 0; }
|
||||
|
||||
// Bars
|
||||
.icon-bar {
|
||||
|
@ -111,76 +92,59 @@ right: 0px;
|
|||
height: 2px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.icon-bar + .icon-bar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.icon-bar + .icon-bar { margin-top: 4px; }
|
||||
}
|
||||
|
||||
.navbar {
|
||||
.collapsing, .collapse.in {
|
||||
width:100%;
|
||||
float:left;
|
||||
.collapsing,
|
||||
.collapse.in {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-dark {
|
||||
.navbar-toggle {
|
||||
border:1px solid #fff;
|
||||
}
|
||||
.icon-bar {
|
||||
border-bottom:1px solid #fff;
|
||||
}
|
||||
.dropdown-menu {
|
||||
background-color: $gray-dark;
|
||||
}
|
||||
.navbar-toggle { border: 1px solid #fff; }
|
||||
.icon-bar { border-bottom: 1px solid #fff; }
|
||||
.dropdown-menu { background-color: $gray-dark; }
|
||||
}
|
||||
|
||||
.navbar #main-menu {
|
||||
float:left;
|
||||
}
|
||||
.navbar #main-menu { float:left; }
|
||||
|
||||
.navbar-nav {
|
||||
.nav-item {
|
||||
float: left;
|
||||
}
|
||||
.nav-item { float: left; }
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding-top: .425rem;
|
||||
padding-top: .425rem;
|
||||
padding-bottom: .425rem;
|
||||
|
||||
+ .nav-link {
|
||||
margin-left: 0rem;
|
||||
}
|
||||
+ .nav-link { margin-left: 0rem; }
|
||||
}
|
||||
|
||||
.nav-item + .nav-item {
|
||||
margin-left: 0rem;
|
||||
}
|
||||
.nav-item + .nav-item { margin-left: 0rem; }
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
margin-left:.425rem;
|
||||
margin-right:.425rem;
|
||||
margin-right: .425rem;
|
||||
margin-left: .425rem;
|
||||
}
|
||||
|
||||
// Fixing BS dropdown in a dropdown
|
||||
.dropdown-menu .dropdown-menu {
|
||||
position:relative;
|
||||
display:block;
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 140px;
|
||||
margin-left: 10px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
margin-left:10px;
|
||||
width:140px;
|
||||
li {
|
||||
list-style: square;
|
||||
padding-left: 0px;
|
||||
list-style: square;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu .menu-item {
|
||||
width:100%;
|
||||
a:hover {
|
||||
background-color:$brand-primary;
|
||||
}
|
||||
}
|
||||
.dropdown-menu .menu-item {
|
||||
width: 100%;
|
||||
a:hover { background-color: $brand-primary; }
|
||||
}
|
||||
|
|
59
search.php
59
search.php
|
@ -5,56 +5,57 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper search-wrapper">
|
||||
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<section id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<section class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<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 -->
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Run the loop for the search to output the results.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-search.php and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'loop-templates/content', 'search' );
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* Run the loop for the search to output the results.
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-search.php and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'loop-templates/content', 'search' );
|
||||
?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php the_posts_navigation(); ?>
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'none' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</section><!-- #primary -->
|
||||
</section><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
* @package understrap
|
||||
*/
|
||||
?>
|
||||
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
|
||||
<label for="s" class="assistive-text"><?php _e( 'Search', 'understrap' ); ?></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="field form-control" name="s" id="s" placeholder="<?php esc_attr_e( 'Search …', 'understrap' ); ?>" />
|
||||
<span class="input-group-btn">
|
||||
<input type="submit" class="submit btn btn-primary" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'understrap' ); ?>" />
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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' ); ?>">
|
||||
<span class="input-group-btn">
|
||||
<input class="submit btn btn-primary" id="searchsubmit" name="submit" type="submit" value="<?php esc_attr_e( 'Search', 'understrap' ); ?>">
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php if ( is_active_sidebar( 'footerfull' ) ): ?>
|
||||
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
|
||||
<div class="wrapper" id="wrapper-footer-full">
|
||||
<div class="wrapper" id="wrapper-footer-full">
|
||||
|
||||
<?php dynamic_sidebar( 'footerfull' ); ?>
|
||||
<?php dynamic_sidebar( 'footerfull' ); ?>
|
||||
|
||||
</div><!-- #wrapper-footer-full -->
|
||||
</div><!-- #wrapper-footer-full -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?php if ( is_active_sidebar( 'hero' ) ): ?>
|
||||
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
|
||||
<div class="wrapper" id="wrapper-hero">
|
||||
<div class="wrapper" id="wrapper-hero">
|
||||
|
||||
<div class="owl-carousel">
|
||||
<div class="owl-carousel">
|
||||
|
||||
<?php dynamic_sidebar( 'hero' ); ?>
|
||||
<?php dynamic_sidebar( 'hero' ); ?>
|
||||
|
||||
</div><!-- .owl-carousel -->
|
||||
</div><!-- .owl-carousel -->
|
||||
|
||||
</div><!-- #wrapper-hero -->
|
||||
</div><!-- #wrapper-hero -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php if ( is_active_sidebar( 'statichero' ) ): ?>
|
||||
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
<!-- ******************* The Hero Widget Area ******************* -->
|
||||
|
||||
<div class="wrapper" id="wrapper-static-hero">
|
||||
<div class="wrapper" id="wrapper-static-hero">
|
||||
|
||||
<?php dynamic_sidebar( 'statichero' ); ?>
|
||||
<?php dynamic_sidebar( 'statichero' ); ?>
|
||||
|
||||
</div><!-- #wrapper-static-hero -->
|
||||
</div><!-- #wrapper-static-hero -->
|
||||
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
*/
|
||||
|
||||
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
|
||||
return;
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="secondary" class="col-md-4 widget-area" role="complementary">
|
||||
<div class="col-md-4 widget-area" id="secondary" role="complementary">
|
||||
|
||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||
|
||||
</div><!-- #secondary -->
|
||||
|
|
41
single.php
41
single.php
|
@ -5,41 +5,42 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper" id="single-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'loop-templates/content', 'single' ); ?>
|
||||
<?php get_template_part( 'loop-templates/content', 'single' ); ?>
|
||||
|
||||
<?php the_post_navigation(); ?>
|
||||
<?php the_post_navigation(); ?>
|
||||
|
||||
<?php
|
||||
// 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;
|
||||
?>
|
||||
<?php
|
||||
// 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;
|
||||
?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .row -->
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
|
@ -10,39 +10,40 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="woocommerce-wrapper">
|
||||
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<!-- The WooCommerce loop -->
|
||||
<!-- The WooCommerce loop -->
|
||||
|
||||
<?php
|
||||
if (is_singular('product')) {
|
||||
<?php
|
||||
if (is_singular('product')) {
|
||||
|
||||
woocommerce_content();
|
||||
woocommerce_content();
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
//For ANY product archive.
|
||||
//Product taxonomy, product search or /shop landing page etc.
|
||||
woocommerce_get_template('archive-product.php');
|
||||
//For ANY product archive.
|
||||
//Product taxonomy, product search or /shop landing page etc.
|
||||
woocommerce_get_template('archive-product.php');
|
||||
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
|
||||
</main><!-- #main -->
|
||||
</main><!-- #main -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div><!-- Container end -->
|
||||
</div><!-- Container end -->
|
||||
|
||||
</div><!-- Wrapper end -->
|
||||
|
||||
|
|
Reference in New Issue