Twenty Fourteen: first pass at matching code standards achieved with Twenty Thirteen development. See #24858, props obenland.

Built from https://develop.svn.wordpress.org/trunk@25021


git-svn-id: http://core.svn.wordpress.org/trunk@25012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-08-15 03:13:29 +00:00
parent 129e4a6e3b
commit e5c55b09e9
27 changed files with 646 additions and 813 deletions

View File

@ -11,24 +11,20 @@ get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<article id="post-0" class="post error404 not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'twentyfourteen' ); ?></h1>
</header><!-- .entry-header -->
<header class="page-header">
<h1 class="page-title"><?php _e( "Oops! That page can't be found.", 'twentyfourteen' ); ?></h1>
</header>
<div class="entry-content">
<p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'twentyfourteen' ); ?></p>
<div class="page-content">
<p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<?php get_search_form(); ?>
</div><!-- .page-content -->
</div><!-- .entry-content -->
</article><!-- #post-0 .post .error404 .not-found -->
</div><!-- #content -->
</div><!-- #primary -->
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

View File

@ -2,6 +2,14 @@
/**
* The template for displaying Archive pages.
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* If you'd like to further customize these archive views, you may create a
* new template file for each specific one. For example, Twenty Fourteen
* already has tag.php for Tag archives, category.php for Category archives,
* and author.php for Author archives.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
@ -13,79 +21,45 @@ get_header(); ?>
<section id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php if ( have_posts() ) : ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) {
printf( __( 'Category Archives: %s', 'twentyfourteen' ), '<span>' . single_cat_title( '', false ) . '</span>' );
if ( is_day() ) :
printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() );
} elseif ( is_tag() ) {
printf( __( 'Tag Archives: %s', 'twentyfourteen' ), '<span>' . single_tag_title( '', false ) . '</span>' );
elseif ( is_month() ) :
printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) );
} elseif ( is_author() ) {
/* Queue the first post, that way we know
* what author we're dealing with (if that is the case).
*/
the_post();
printf( __( 'Author Archives: %s', 'twentyfourteen' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
elseif ( is_year() ) :
printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) );
} elseif ( is_day() ) {
printf( __( 'Daily Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date() . '</span>' );
} elseif ( is_month() ) {
printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
} elseif ( is_year() ) {
printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
} else {
else :
_e( 'Archives', 'twentyfourteen' );
}
endif;
?>
</h1>
<?php
if ( is_category() ) {
// show an optional category description
$category_description = category_description();
if ( ! empty( $category_description ) )
echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
} elseif ( is_tag() ) {
// show an optional tag description
$tag_description = tag_description();
if ( ! empty( $tag_description ) )
echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
}
?>
</header><!-- .page-header -->
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
<?php twentyfourteen_get_template_part(); ?>
twentyfourteen_get_template_part();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
<?php endwhile; ?>
else :
get_template_part( 'no-results', 'archive' );
<?php twentyfourteen_content_nav( 'nav-below' ); ?>
endif;
?>
</div><!-- #content -->
</section><!-- #primary -->
<?php else : ?>
<?php get_template_part( 'no-results', 'archive' ); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</section><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

View File

@ -2,75 +2,65 @@
/**
* The template for displaying Comments.
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
* handled by a callback to twentyfourteen_comment() which is
* located in the functions.php file.
* The area of the page that contains comments and the comment form.
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
/*
* If the current post is protected by a password and the visitor has not yet
* entered the password we will return early without loading the comments.
*/
if ( post_password_required() )
return;
?>
<?php
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() )
return;
?>
<div id="comments" class="comments-area">
<?php // You can start editing here -- including this comment! ?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
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 role="navigation" id="comment-nav-above" class="site-navigation comment-navigation clearfix">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
</nav><!-- #comment-nav-above .site-navigation .comment-navigation -->
<?php endif; // check for comment navigation ?>
<h2 class="comments-title">
<?php
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
number_format_i18n( get_comments_number() ), get_the_title() );
?>
</h2>
<ol class="commentlist">
<?php
/* Loop through and list the comments. Tell wp_list_comments()
* to use twentyfourteen_comment() to format the comments.
* If you want to overload this in a child theme then you can
* define twentyfourteen_comment() and that will be used instead.
* See twentyfourteen_comment() in inc/template-tags.php for more.
*/
wp_list_comments( array( 'callback' => 'twentyfourteen_comment' ) );
?>
</ol><!-- .commentlist -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
</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 role="navigation" id="comment-nav-below" class="site-navigation comment-navigation clearfix">
<h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
</nav><!-- #comment-nav-below .site-navigation .comment-navigation -->
<?php endif; // check for comment navigation ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
// TODO: Remove callback and update styles.
'callback'=>'twentyfourteen_comment',
) );
?>
</ol><!-- .comment-list -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyfourteen' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyfourteen' ) ); ?></div>
</nav><!-- #comment-nav-below -->
<?php endif; // Check for comment navigation. ?>
<?php if ( ! comments_open() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
<?php endif; ?>
<?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="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</div><!-- #comments .comments-area -->
</div><!-- #comments -->

View File

@ -5,41 +5,47 @@
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-featured">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a class="attachment-featured-featured" href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>">
<?php
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 1 ) );
if ( '' != get_the_post_thumbnail() ) :
if ( has_post_thumbnail() ) :
the_post_thumbnail( 'featured-thumbnail-featured' );
elseif ( $images ) :
$image = array_shift( $images );
echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' );
else : ?>
<img src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" class="featured-thumbnail-featured" /><?php
else :
$images = get_children( array(
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'menu_order',
'order' => 'ASC',
'numberposts' => 1,
) );
if ( $images ) :
$image = array_shift( $images );
echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' );
else : ?>
<img class="featured-thumbnail-featured" src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" /><?php
endif;
endif;
?>
</a>
<div class="entry-wrap">
<header class="entry-header">
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
<div class="entry-meta">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
if ( $categories_list && twentyfourteen_categorized_blog() ) :
?>
<span class="cat-links">
<?php echo $categories_list; ?>
</span>
<?php endif; // End if categories ?>
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
</div><!-- .entry-meta -->
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-summary clearfix">
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
</div>
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -1,6 +1,6 @@
<?php
/**
* The template used for displaying page content in page.php
* The template used for displaying page content.
*
* @package WordPress
* @subpackage Twenty_Fourteen
@ -8,20 +8,19 @@
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?>
<div class="entry-content clearfix">
<?php the_content(); ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
'link_after' => '</span>',
) );
edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
?>
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -43,41 +43,37 @@ $format = get_post_format();
<?php
if ( 'post' == get_post_type() )
twentyfourteen_posted_on();
?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) :
?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content clearfix">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); ?>
<div class="entry-content">
<?php
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php if ( ( 'quote' == $format ) || ( 'aside' == $format ) ) : ?>
<?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?>
<div class="entry-meta">
<?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
</div>
<?php endif; ?>
<?php
$tag_list = get_the_tag_list();
if ( '' != $tag_list && 'post' == get_post_type() ) :
?>
<span class="tag-links"><?php echo $tag_list; ?></span>
<?php endif; // End if $tag_list ?>
<?php if ( has_tag() ) : ?>
<span class="tag-links"><?php echo get_the_tag_list(); ?></span>
<?php endif; ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -6,29 +6,39 @@
if ( isset( $GLOBALS['content_width'] ) )
$GLOBALS['content_width'] = 306;
$format = get_post_format();
if ( false === $format )
$format = 'standard';
$images = get_posts( array(
'post_parent' => get_post()->post_parent,
'fields' => 'ids',
'numberposts' => -1,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'
) );
$total_images = count( $images );
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<div class="entry-content clearfix">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php
if ( 'gallery' == $format ) :
$featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' );
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );
if ( $images ) :
$total_images = count( $images );
if ( empty( $featured_image ) ) {
$image = array_shift( $images );
$featured_image = wp_get_attachment_image( $image->ID, 'featured-thumbnail-formatted' );
}
if ( has_post_format( 'gallery' ) ) :
if ( has_post_thumbnail() ) :
$featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' );
elseif ( $total_images > 0 ) :
$image = array_shift( $images );
$featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' );
?>
<a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a>
<p class="wp-caption-text"><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyfourteen' ),
'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"',
<a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a>
<p class="wp-caption-text">
<?php
printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
esc_url( get_permalink() ),
number_format_i18n( $total_images )
); ?></p><?php
);
?>
</p>
<?php
else :
the_excerpt();
endif;
@ -41,14 +51,16 @@ if ( false === $format )
<header class="entry-header">
<div class="entry-meta">
<?php
if ( 'link' != $format ) :
the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark">', '</a></h1>' );
if ( ! has_post_format( 'link' ) ) :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
twentyfourteen_posted_on();
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
?>
<?php twentyfourteen_posted_on(); ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
<?php endif; ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
</article>
</article><!-- #post-## -->

View File

@ -3,40 +3,31 @@
* @package WordPress
* @subpackage Twenty_Fourteen
*/
$format = get_post_format();
if ( false === $format )
$format = 'standard';
has_post_format()
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( ( 'video' != $format ) && ( 'image' != $format ) && ( 'aside' != $format ) && ( 'link' != $format ) && ( 'quote' != $format ) ) : ?>
<?php if ( has_post_thumbnail() && ! has_post_format( array( 'video', 'image', 'aside', 'link', 'quote' ) ) ) : ?>
<div class="attachment-featured-thumbnail">
<?php
if ( '' != get_the_post_thumbnail() )
the_post_thumbnail( 'featured-thumbnail-large' );
?>
<?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
<div class="entry-meta">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
if ( $categories_list && twentyfourteen_categorized_blog() ) :
?>
<span class="cat-links">
<?php echo $categories_list; ?>
</span>
<?php endif; // End if categories ?>
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
</div><!-- .entry-meta -->
<?php
endif;
<?php if ( ( 'standard' == $format ) || ( 'video' == $format ) || ( 'image' == $format ) || ( 'gallery' == $format ) ) : ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php endif; ?>
if ( ! has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) :
the_title( '<h1 class="entry-title">', '</h1>' );
endif;
?>
<div class="entry-meta">
<?php if ( 'standard' != $format ) : ?>
<?php if ( has_post_format() ) : ?>
<span class="post-format">
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( get_post_format() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( get_post_format() ) ) ); ?>"><?php echo get_post_format_string( get_post_format() ); ?></a>
</span>
@ -44,7 +35,7 @@ if ( false === $format )
<?php twentyfourteen_posted_on(); ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
<?php endif; ?>
@ -52,32 +43,29 @@ if ( false === $format )
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content clearfix">
<?php the_content(); ?>
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php if ( ( 'quote' == $format ) || ( 'aside' == $format ) ) : ?>
<?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?>
<div class="entry-meta">
<?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
<?php
$tag_list = get_the_tag_list();
if ( '' != $tag_list ) :
?>
<?php if ( has_tag() ) : ?>
<span class="tag-links">
<?php echo $tag_list; ?>
<?php echo get_the_tag_list(); ?>
</span>
<?php endif; // End if $tag_list ?>
<?php endif; ?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->

View File

@ -3,74 +3,66 @@
* @package WordPress
* @subpackage Twenty_Fourteen
*/
$format = get_post_format();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="attachment-featured-thumbnail">
<?php
if ( '' != get_the_post_thumbnail() )
the_post_thumbnail( 'featured-thumbnail-large' );
?>
<?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
</a>
<header class="entry-header">
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) );
if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) :
?>
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
<div class="entry-meta">
<span class="cat-links"><?php echo $categories_list; ?></span>
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
</div>
<?php endif; ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<div class="entry-meta">
<?php if ( 'gallery' == $format ) : ?>
<?php if ( has_post_format( 'gallery' ) ) : ?>
<span class="post-format">
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( get_post_format() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( get_post_format() ) ) ); ?>"><?php echo get_post_format_string( get_post_format() ); ?></a>
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'All %s posts', 'twentyfourteen' ), get_post_format_string( 'gallery' ) ) ); ?>"><?php echo get_post_format_string( 'gallery' ); ?></a>
</span>
<?php endif; ?>
<?php
endif;
if ( 'post' == get_post_type() )
twentyfourteen_posted_on();
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
<?php
endif;
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<?php if ( is_search() ) : ?>
<div class="entry-summary clearfix">
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content clearfix">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); ?>
<div class="entry-content">
<?php
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
<?php
$tag_list = get_the_tag_list();
if ( '' != $tag_list && 'post' == get_post_type() ) :
?>
<footer class="entry-meta">
<span class="tag-links"><?php echo $tag_list; ?></span>
</footer><!-- .entry-meta -->
<?php endif; // End if $tag_list ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php if ( has_tag() ) : ?>
<footer class="entry-meta">
<span class="tag-links"><?php echo get_the_tag_list(); ?></span>
</footer><!-- .entry-meta -->
<?php endif; ?>
</article><!-- #post-## -->

View File

@ -1,5 +1,5 @@
<div class="featured-content-wrapper">
<div id="featured-content" class="featured-content clearfix">
<div id="featured-content" class="featured-content">
<?php
do_action( 'twentyfourteen_featured_posts_before' );
@ -7,6 +7,7 @@
$featured_posts = twentyfourteen_get_featured_posts();
foreach ( (array) $featured_posts as $order => $post ) :
setup_postdata( $post );
get_template_part( 'content', 'featured-post' );
endforeach;

View File

@ -2,26 +2,25 @@
/**
* The template for displaying the footer.
*
* Contains the closing of the id=main div and all content after
* Contains footer content and the closing of the #main and #page div elements.
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
?>
</div><!-- #main .site-main -->
</div><!-- #main -->
<?php get_sidebar( 'footer' ); ?>
<?php get_sidebar( 'footer' ); ?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<?php do_action( 'twentyfourteen_credits' ); ?>
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->
</footer><!-- #colophon .site-footer -->
</div><!-- #page .hfeed .site -->
<?php wp_footer(); ?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<?php do_action( 'twentyfourteen_credits' ); ?>
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>

View File

@ -0,0 +1,51 @@
<?php
/**
* The template for displaying the home page.
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
get_header(); ?>
<div class="front-page-content-wrapper">
<div class="front-page-content-main">
<?php if ( twentyfourteen_has_featured_posts() ) : ?>
<?php get_template_part( 'featured-content' ); ?>
<?php endif; ?>
<div class="front-page-content-area">
<div id="primary" class="content-area no-sidebar">
<div id="content" class="site-content" role="main">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
twentyfourteen_get_template_part();
comments_template();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
else :
get_template_part( 'no-results', 'index' );
endif;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_template_part( 'recent-formatted-posts' ); ?>
</div><!-- .front-page-content-area -->
</div><!-- .front-page-content-main -->
</div><!-- .front-page-content-wrapper -->
<?php
get_sidebar();
get_footer();

View File

@ -8,58 +8,22 @@
get_header(); ?>
<?php if ( is_front_page() ) : ?>
<div class="front-page-content-wrapper">
<div class="front-page-content-main">
<?php if ( twentyfourteen_has_featured_posts() ) : ?>
<?php get_template_part( 'featured-content' ); ?>
<?php endif; ?>
<div class="front-page-content-area clearfix">
<div id="primary" class="content-area no-sidebar">
<div id="content" class="site-content full-width" role="main">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'content', 'page' );
comments_template( '', true );
endwhile;
twentyfourteen_content_nav( 'nav-below' );
else :
get_template_part( 'no-results', 'index' );
endif;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- .front-page-content-area -->
</div><!-- .front-page-content-main -->
</div><!-- .front-page-content-wrapper -->
<?php else : ?>
<div id="primary" class="content-area">
<div id="content" class="site-content full-width" role="main">
<?php
while ( have_posts() ) :
the_post();
<?php while ( have_posts() ) : the_post(); ?>
get_template_part( 'content', 'page' );
<?php get_template_part( 'content', 'page' ); ?>
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() )
comments_template();
endwhile;
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php endif; // is_front_page() check ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();

View File

@ -27,18 +27,8 @@ if ( ! function_exists( 'twentyfourteen_setup' ) ) :
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support post thumbnails.
*
*/
function twentyfourteen_setup() {
/**
* Custom template tags for this theme.
*/
require( get_template_directory() . '/inc/template-tags.php' );
/**
* Customizer additions
*/
require( get_template_directory() . '/inc/customizer.php' );
/**
* Make theme available for translation
@ -81,15 +71,9 @@ function twentyfourteen_setup() {
/**
* This theme allows users to set a custom background.
*/
$args = apply_filters( 'twentyfourteen_custom_background_args', array( 'default-color' => 'f5f5f5' ) );
if ( function_exists( 'wp_get_theme' ) ) {
add_theme_support( 'custom-background', $args );
} else {
// Compat: Versions of WordPress prior to 3.4.
define( 'BACKGROUND_COLOR', $args['default-color'] );
add_custom_background();
}
add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array(
'default-color' => 'f5f5f5',
) ) );
}
endif; // twentyfourteen_setup
add_action( 'after_setup_theme', 'twentyfourteen_setup' );
@ -112,16 +96,9 @@ function twentyfourteen_has_featured_posts( $minimum = 1 ) {
if ( is_paged() )
return false;
$minimum = absint( $minimum );
$featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() );
if ( ! is_array( $featured_posts ) )
return false;
if ( $minimum > count( $featured_posts ) )
return false;
return true;
return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum );
}
/**
@ -191,18 +168,14 @@ function twentyfourteen_widgets_init() {
add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
/**
* Register Google fonts for Twenty Fourteen
* Register Google fonts for Twenty Fourteen.
*
*/
function twentyfourteen_fonts() {
/* translators: If there are characters in your language that are not supported
by Lato, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) {
$protocol = is_ssl() ? 'https' : 'http';
wp_register_style( 'twentyfourteen-lato', "$protocol://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic", array(), null );
}
if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) )
wp_register_style( 'twentyfourteen-lato', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', array(), null );
}
add_action( 'init', 'twentyfourteen_fonts' );
@ -215,13 +188,11 @@ function twentyfourteen_scripts() {
wp_enqueue_style( 'twentyfourteen-lato' );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
if ( is_singular() && wp_attachment_is_image() )
wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' );
}
wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130402', true );
}
@ -231,13 +202,10 @@ add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
* Enqueue Google fonts style to admin screen for custom header display.
*
*/
function twentyfourteen_admin_fonts( $hook_suffix ) {
if ( 'appearance_page_custom-header' != $hook_suffix )
return;
function twentyfourteen_admin_fonts() {
wp_enqueue_style( 'twentyfourteen-lato' );
}
add_action( 'admin_enqueue_scripts', 'twentyfourteen_admin_fonts' );
add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' );
/**
* Implement the Custom Header feature
@ -285,6 +253,62 @@ function twentyfourteen_custom_excerpt_more( $output ) {
}
add_filter( 'get_the_excerpt', 'twentyfourteen_custom_excerpt_more' );
if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
/**
* Prints the attached image with a link to the next attached image.
*
* @since Twenty Thirteen 1.0
*
* @return void
*/
function twentyfourteen_the_attached_image() {
$post = get_post();
$attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) );
$next_attachment_url = wp_get_attachment_url();
/**
* Grab the IDs of all the image attachments in a gallery so we can get the URL
* of the next adjacent image in a gallery, or the first image (if we're
* looking at the last image in a gallery), or, in a gallery of one, just the
* link to that image file.
*/
$attachment_ids = get_posts( array(
'post_parent' => $post->post_parent,
'fields' => 'ids',
'numberposts' => -1,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'
) );
// If there is more than 1 attachment in a gallery...
if ( count( $attachment_ids ) > 1 ) {
foreach ( $attachment_ids as $attachment_id ) {
if ( $attachment_id == $post->ID ) {
$next_id = current( $attachment_ids );
break;
}
}
// get the URL of the next image attachment...
if ( $next_id )
$next_attachment_url = get_attachment_link( $next_id );
// or get the URL of the first image attachment.
else
$next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) );
}
printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
esc_url( $next_attachment_url ),
the_title_attribute( array( 'echo' => false ) ),
wp_get_attachment_image( $post->ID, $attachment_size )
);
}
endif;
/**
* Count the number of footer sidebars to enable dynamic classes for the footer
*
@ -328,7 +352,7 @@ function twentyfourteen_footer_sidebar_class() {
}
if ( $class )
echo 'class="clearfix ' . $class . '"';
printf( 'class="%s"', $class );
}
/**
@ -443,4 +467,14 @@ function twentyfourteen_wp_title( $title, $sep ) {
return $title;
}
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 );
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Customizer additions
*/
require get_template_directory() . '/inc/customizer.php';

View File

@ -10,13 +10,6 @@
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<script>
/**
* Replaces class "no-js" with "js" in the <html>-tag when JavaScript is being used.
* Allows easy styling for browsers [not] supporting/running JavaScript.
*/
document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');
</script>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
@ -59,16 +52,16 @@ document.documentElement.className = document.documentElement.className.replace(
<?php do_action( 'before' ); ?>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) { ?>
if ( ! empty( $header_image ) ) : ?>
<div id="site-header">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
</a>
</div>
<?php } ?>
<?php endif; ?>
<header id="masthead" class="site-header clearfix" role="banner">
<div class="header-main clearfix">
<header id="masthead" class="site-header" role="banner">
<div class="header-main clear">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<div class="header-extra">
@ -84,8 +77,8 @@ document.documentElement.className = document.documentElement.className.replace(
</div>
<nav role="navigation" class="site-navigation primary-navigation">
<h1 class="assistive-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
<h1 class="screen-reader-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>
<div class="screen-reader-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyfourteen' ); ?>"><?php _e( 'Skip to content', 'twentyfourteen' ); ?></a></div>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav>
@ -95,7 +88,7 @@ document.documentElement.className = document.documentElement.className.replace(
<?php if ( $social_links ) : ?>
<div class="social-links-wrapper hide">
<ul class="social-links clearfix">
<ul class="social-links clear">
<?php if ( is_email( $email_link ) ) : ?>
<li class="email-link">
<a href="mailto:<?php echo antispambot( sanitize_email( $email_link ) ); ?>" class="genericon" title="<?php esc_attr_e( 'Email', 'twentyfourteen' ); ?>" target="_blank">
@ -188,10 +181,10 @@ document.documentElement.className = document.documentElement.className.replace(
<?php endif; ?>
<div class="search-box-wrapper hide">
<div class="search-box clearfix">
<div class="search-box clear">
<?php get_search_form(); ?>
</div>
</div>
</header><!-- #masthead .site-header -->
</header><!-- #masthead -->
<div id="main" class="site-main clearfix">
<div id="main" class="site-main">

View File

@ -9,14 +9,14 @@
get_header();
?>
<div id="primary" class="content-area image-attachment">
<section id="primary" class="content-area image-attachment">
<div id="content" class="site-content full-width" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<div class="entry-meta">
<?php $metadata = wp_get_attachment_metadata(); ?>
@ -31,77 +31,43 @@ get_header();
</header><!-- .entry-header -->
<div class="entry-content">
<div class="entry-attachment">
<div class="attachment">
<?php
/**
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
*/
$attachments = array_values( get_children( array(
'post_parent' => $post->post_parent,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'
) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); // Filterable image size.
echo wp_get_attachment_image( $post->ID, $attachment_size );
?></a>
<?php twentyfourteen_the_attached_image(); ?>
</div><!-- .attachment -->
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
<?php if ( has_excerpt() ) : ?>
<div class="entry-caption">
<?php the_excerpt(); ?>
</div><!-- .entry-caption -->
<?php endif; ?>
</div><!-- .entry-attachment -->
<?php the_content(); ?>
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
<?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); ?>
<?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
<?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); ?>
<?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
<?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' ); ?>
<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
<?php _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); ?>
<?php endif; ?>
<?php
if ( comments_open() && pings_open() ) : // Comments and trackbacks open
printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() );
elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open
printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() );
elseif ( comments_open() && ! pings_open() ) : // Only comments open
_e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' );
elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed
_e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' );
endif;
?>
</footer><!-- .entry-meta -->
</article><!-- #post-<?php the_ID(); ?> -->
</article><!-- #post-## -->
<nav id="image-navigation" class="site-navigation">
<?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?>
@ -112,9 +78,9 @@ get_header();
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area .image-attachment -->
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar();
get_footer();

View File

@ -22,8 +22,7 @@
* @subpackage Twenty_Fourteen
*/
function twentyfourteen_custom_header_setup() {
$args = array(
'default-image' => '',
add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array(
'default-text-color' => 'fff',
'width' => 1260,
'height' => 240,
@ -31,49 +30,11 @@ function twentyfourteen_custom_header_setup() {
'wp-head-callback' => 'twentyfourteen_header_style',
'admin-head-callback' => 'twentyfourteen_admin_header_style',
'admin-preview-callback' => 'twentyfourteen_admin_header_image',
);
) ) );
$args = apply_filters( 'twentyfourteen_custom_header_args', $args );
if ( function_exists( 'wp_get_theme' ) ) {
add_theme_support( 'custom-header', $args );
} else {
// Compat: Versions of WordPress prior to 3.4.
define( 'HEADER_TEXTCOLOR', $args['default-text-color'] );
define( 'HEADER_IMAGE', $args['default-image'] );
define( 'HEADER_IMAGE_WIDTH', $args['width'] );
define( 'HEADER_IMAGE_HEIGHT', $args['height'] );
add_custom_image_header( $args['wp-head-callback'], $args['admin-head-callback'], $args['admin-preview-callback'] );
}
}
add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' );
/**
* Shiv for get_custom_header().
*
* get_custom_header() was introduced to WordPress
* in version 3.4. To provide backward compatibility
* with previous versions, we will define our own version
* of this function.
*
* @todo Remove this function when WordPress 3.6 is released.
* @return stdClass All properties represent attributes of the curent header image.
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
if ( ! function_exists( 'get_custom_header' ) ) {
function get_custom_header() {
return (object) array(
'url' => get_header_image(),
'thumbnail_url' => get_header_image(),
'width' => HEADER_IMAGE_WIDTH,
'height' => HEADER_IMAGE_HEIGHT,
);
}
}
if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
@ -82,17 +43,18 @@ if ( ! function_exists( 'twentyfourteen_header_style' ) ) :
*
*/
function twentyfourteen_header_style() {
$header_text_color = get_header_textcolor();
// If no custom options for text are set, let's bail
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
if ( HEADER_TEXTCOLOR == get_header_textcolor() )
// $header_text_color options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
if ( HEADER_TEXTCOLOR == $header_text_color )
return;
// If we get this far, we have custom styles. Let's do this.
?>
<style type="text/css">
<?php
// Has the text been hidden?
if ( 'blank' == get_header_textcolor() ) :
if ( 'blank' == $header_text_color ) :
?>
.site-title {
position: absolute !important;
@ -104,7 +66,7 @@ function twentyfourteen_header_style() {
else :
?>
.site-title a {
color: #<?php echo get_header_textcolor(); ?> !important;
color: #<?php echo $header_text_color; ?> !important;
}
<?php endif; ?>
</style>
@ -153,19 +115,15 @@ if ( ! function_exists( 'twentyfourteen_admin_header_image' ) ) :
* @see twentyfourteen_custom_header_setup().
*
*/
function twentyfourteen_admin_header_image() { ?>
function twentyfourteen_admin_header_image() {
$header_image = get_header_image();
?>
<div id="headimg">
<?php
if ( 'blank' == get_header_textcolor() || '' == get_header_textcolor() )
$style = ' style="display:none;"';
else
$style = ' style="color:#' . get_header_textcolor() . ';"';
?>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<img src="<?php echo esc_url( $header_image ); ?>" alt="" />
<?php if ( ! empty( $header_image ) ) : ?>
<img src="<?php echo esc_url( $header_image ); ?>" alt="">
<?php endif; ?>
<h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<h1 class="displaying-header-text"><a id="name"<?php echo sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
</div>
<?php }
endif; // twentyfourteen_admin_header_image
<?php
}
endif; // twentyfourteen_admin_header_image

View File

@ -184,4 +184,4 @@ add_action( 'customize_register', 'twentyfourteen_customize_register' );
function twentyfourteen_customize_preview_js() {
wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20120827', true );
}
add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );

View File

@ -35,7 +35,7 @@ function twentyfourteen_content_nav( $nav_id ) {
?>
<nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>">
<h1 class="assistive-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
<?php if ( is_single() ) : // navigation links for single posts ?>
@ -182,27 +182,15 @@ function twentyfourteen_category_transient_flusher() {
delete_transient( 'all_the_cool_cats' );
}
add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
/**
* Include the Post-Format-specific template for the content.
* This is called in index.php and single.php
*/
function twentyfourteen_get_template_part() {
$format = get_post_format();
switch( $format ) {
case 'aside':
case 'quote':
case 'link':
case 'video':
case 'image':
get_template_part( 'content', 'post-format' );
break;
default:
get_template_part( 'content', get_post_format() );
break;
}
}
if ( has_post_format( array( 'aside', 'quote', 'link', 'video', 'image' ) ) )
get_template_part( 'content', 'post-format' );
else
get_template_part( 'content', get_post_format() );
}

View File

@ -14,71 +14,28 @@
get_header(); ?>
<?php if ( is_front_page() ) : ?>
<div class="front-page-content-wrapper">
<div class="front-page-content-main">
<?php if ( twentyfourteen_has_featured_posts() ) : ?>
<?php get_template_part( 'featured-content' ); ?>
<?php endif; ?>
<div class="front-page-content-area clearfix">
<div id="primary" class="content-area no-sidebar">
<div id="content" class="site-content" role="main">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
twentyfourteen_get_template_part();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
else :
get_template_part( 'no-results', 'index' );
endif;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_template_part( 'recent-formatted-posts' ); ?>
</div><!-- .front-page-content-area -->
</div><!-- .front-page-content-main -->
</div><!-- .front-page-content-wrapper -->
<?php get_sidebar(); ?>
<?php else : ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php if ( have_posts() ) : ?>
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
<?php while ( have_posts() ) : the_post(); ?>
twentyfourteen_get_template_part();
endwhile;
twentyfourteen_content_nav( 'nav-below' );
<?php twentyfourteen_get_template_part(); ?>
else :
get_template_part( 'no-results', 'index' );
<?php endwhile; ?>
endif;
?>
<?php twentyfourteen_content_nav( 'nav-below' ); ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
<?php get_sidebar(); ?>
<?php endif; // is_front_page() check ?>
<?php get_footer(); ?>
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

View File

@ -1,34 +1,30 @@
<?php
/**
* The template part for displaying a message that posts cannot be found.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
* The template for displaying a "No posts found" message.
*
* @package WordPress
* @subpackage Twenty_Fourteen
*/
?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
</header><!-- .entry-header -->
<header class="page-header">
<h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1>
</header>
<div class="entry-content">
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<div class="page-content">
<?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>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), 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.', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<?php else : ?>
<?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .entry-content -->
</article><!-- #post-0 .post .no-results .not-found -->
<?php endif; ?>
</div><!-- .page-content -->

View File

@ -13,64 +13,25 @@
get_header(); ?>
<?php if ( is_front_page() ) : ?>
<div class="front-page-content-wrapper">
<div class="front-page-content-main">
<?php if ( twentyfourteen_has_featured_posts() ) : ?>
<?php get_template_part( 'featured-content' ); ?>
<?php endif; ?>
<div class="front-page-content-area clearfix">
<div id="primary" class="content-area no-sidebar">
<div id="content" class="site-content" role="main">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'content', 'page' );
comments_template( '', true );
endwhile;
twentyfourteen_content_nav( 'nav-below' );
else :
get_template_part( 'no-results', 'index' );
endif;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_template_part( 'recent-formatted-posts' ); ?>
</div><!-- .front-page-content-area -->
</div><!-- .front-page-content-main -->
</div><!-- .front-page-content-wrapper -->
<?php get_sidebar(); ?>
<?php else : ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
<?php get_template_part( 'content', 'page' ); ?>
get_template_part( 'content', 'page' );
<?php comments_template( '', true ); ?>
<?php endwhile; ?>
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() )
comments_template();
endwhile;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
<?php get_sidebar(); ?>
<?php endif; // is_front_page() check ?>
<?php get_footer(); ?>
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

View File

@ -11,31 +11,31 @@ get_header(); ?>
<section id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php if ( have_posts() ) : ?>
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
</header><!-- .page-header -->
<?php while ( have_posts() ) : the_post(); ?>
<?php
while ( have_posts() ) :
the_post();
<?php twentyfourteen_get_template_part(); ?>
twentyfourteen_get_template_part();
endwhile;
<?php endwhile; ?>
twentyfourteen_content_nav( 'nav-below' );
<?php twentyfourteen_content_nav( 'nav-below' ); ?>
else :
get_template_part( 'no-results', 'search' );
<?php else : ?>
endif;
?>
<?php get_template_part( 'no-results', 'search' ); ?>
</div><!-- #content -->
</section><!-- #primary -->
<?php endif; ?>
</div><!-- #content .site-content -->
</section><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

View File

@ -6,8 +6,10 @@
* @subpackage Twenty_Fourteen
*/
?>
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<label for="s" class="assistive-text"><?php _e( 'Search', 'twentyfourteen' ); ?></label>
<input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php esc_attr_e( 'Search &hellip;', 'twentyfourteen' ); ?>" />
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyfourteen' ); ?>" />
</form>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label>
<span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?></span>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentyfourteen' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?>">
</label>
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentyfourteen' ); ?>">
</form>

View File

@ -8,36 +8,24 @@
?>
<div id="secondary">
<div id="secondary-top">
<?php
$description = get_bloginfo( 'description' );
if ( ! empty ( $description ) ) : ?>
<?php
$description = get_bloginfo( 'description' );
if ( ! empty ( $description ) ) :
?>
<h2 class="site-description"><?php echo esc_html( $description ); ?></h2>
<?php endif; ?>
<?php endif; ?>
<?php if ( has_nav_menu( 'secondary' ) ) : ?>
<nav role="navigation" class="site-navigation secondary-navigation">
<?php if ( has_nav_menu( 'secondary' ) ) : ?>
<nav role="navigation" class="navigation secondary-navigation">
<?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
</nav>
<?php endif; ?>
<?php endif; ?>
</div>
<div id="secondary-bottom" class="widget-area" role="complementary">
<?php do_action( 'before_sidebar' ); ?>
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
<aside id="categories" class="widget widget_categories">
<h1 class="widget-title"><?php _e( 'Categories', 'twentyfourteen' ); ?></h1>
<ul>
<?php wp_list_categories( array( 'title_li' => '' ) ); ?>
</ul>
</aside>
<aside id="archives" class="widget widget_archive">
<h1 class="widget-title"><?php _e( 'Archives', 'twentyfourteen' ); ?></h1>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</aside>
<?php endif; // end sidebar widget area ?>
<?php
do_action( 'before_sidebar' );
dynamic_sidebar( 'sidebar-1' );
?>
</div><!-- .widget-area -->
</div><!-- #secondary -->

View File

@ -10,26 +10,23 @@ get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php twentyfourteen_content_nav( 'nav-below' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template( '', true );
while ( have_posts() ) :
the_post();
get_template_part( 'content', 'single' );
twentyfourteen_content_nav( 'nav-below' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() )
comments_template();
endwhile;
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php endwhile; // end of the loop. ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
get_sidebar( 'content' );
get_sidebar();
get_footer();

View File

@ -434,7 +434,7 @@ textarea {
vertical-align: top; /* Improves readability and alignment in all browsers */
width: 100%;
}
#searchform input[type="text"] {
.search-field {
width: 100%;
}
@ -487,26 +487,52 @@ input[type="submit"],
margin: 0 auto;
}
/* Text meant only for screen readers */
.assistive-text {
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
/* Assistive text */
.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
}
.screen-reader-text:focus {
background-color: #f1f1f1;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
clip: auto !important;
color: #21759b;
display: block;
font-size: 14px;
font-weight: bold;
height: auto;
line-height: normal;
padding: 15px 23px 14px;
position: absolute;
left: 5px;
top: 5px;
text-decoration: none;
width: auto;
z-index: 100000; /* Above WP toolbar */
}
/* Hidden */
.hide {
display: none;
}
/* Clearing floats */
.clearfix:after {
clear: both;
}
.clearfix:before,
.clearfix:after {
/* Clearing */
.clear:before,
.clear:after,
[class*="content"]:before,
[class*="content"]:after,
[class*="site"]:before,
[class*="site"]:after {
content: '';
display: table;
content: "";
}
.clear:after,
[class*="content"]:after,
[class*="site"]:after {
clear: both;
}
@ -771,7 +797,7 @@ body {
.search-box {
background-color: #35921f;
}
.search-box #searchform input[type="text"] {
.search-box .search-field {
background-color: #fff;
float: right;
font-size: 13px;
@ -1032,11 +1058,13 @@ span + .edit-link:before,
content: '\0020\007c\0020';
}
.entry-content,
.page-content,
.entry-summary {
position: relative;
z-index: 2;
}
.entry-content a {
.entry-content a,
.page-content a, {
text-decoration: underline;
}
.entry-content table,
@ -1075,12 +1103,14 @@ footer.entry-meta {
}
/* #primary specific styles */
#primary .entry-header {
#primary .entry-header,
#primary .page-header {
background-color: #fff;
padding: 24px 10px 12px;
padding: 2.4rem 1.0rem 1.2rem;
}
#primary .entry-title {
#primary .entry-title,
#primary .page-title {
font-size: 33px;
font-size: 3.3rem;
font-weight: 300;
@ -1096,6 +1126,7 @@ footer.entry-meta {
text-transform: uppercase;
}
#primary .entry-content,
#primary .page-content,
#primary .entry-summary {
background-color: #fff;
padding: 12px 10px 0;
@ -1165,10 +1196,10 @@ footer.entry-meta {
/* Page specific styles */
.page #primary .entry-header,
.error404 #primary .entry-header,
.error404 #primary .page-header,
.single-attachment #primary .entry-header,
.page #primary .entry-content,
.error404 #primary .entry-content,
.error404 #primary .page-content,
.single-attachment #primary .entry-content {
padding-top: 0;
}
@ -1275,11 +1306,11 @@ footer.entry-meta {
}
/* For Firefox to avoid jagged edge */
@-moz-document url-prefix() {
.tag-links a:before {
border-right: 10px solid #8c8c8c;
.tag-links a:before {
border-right: 10px solid #8c8c8c;
left: -10px;
left: -1.0rem;
}
}
}
.tag-links a:hover:before {
border-right-color: #2b2b2b;
@ -1552,12 +1583,12 @@ footer.entry-meta {
/* =404 Page
----------------------------------------------- */
.error404 .entry-content #searchform {
.error404 .page-content .search-form {
margin-bottom: 36px;
margin-bottom: 3.6rem;
}
.error404 .entry-content .widget-title,
.error404 .entry-content .widgettitle {
.error404 .page-content .widget-title,
.error404 .page-content .widgettitle {
border-top: 5px solid #000;
color: #2b2b2b;
padding-top: 7px;
@ -1568,30 +1599,17 @@ footer.entry-meta {
/* =Media
----------------------------------------------- */
img {
max-width: 100%;
height: auto;
}
#site-header img,
.attachment-featured-thumbnail-large,
.entry-content img,
.comment-content img,
.widget img {
max-width: 100%;
vertical-align: middle;
}
#site-header img,
.entry-content img,
.attachment-featured-thumbnail-large,
img[class*="align"],
img[class*="wp-image-"],
.widget img {
height: auto;
}
#site-header img,
.entry-content img,
img.size-full,
img.size-large,
img.wp-post-image {
max-width: 100%;
height: auto;
}
.attachment-featured-featured img,
.attachment-featured-thumbnail img {
height: auto;
@ -1615,8 +1633,7 @@ img.aligncenter,
margin-bottom: 7px;
margin-bottom: 0.7rem;
}
.entry-content img.wp-smiley,
.comment-content img.wp-smiley {
.wp-smiley {
border: none;
margin-bottom: 0;
margin-top: 0;
@ -1851,7 +1868,7 @@ span > object {
padding: 0 10px;
padding: 0 1.0rem;
}
.commentlist {
.comment-list {
list-style: none;
margin: 0 0 48px 0;
margin: 0 0 4.8rem 0;
@ -1870,14 +1887,14 @@ span > object {
color: #2b2b2b;
}
.comment-meta a,
.commentlist li.trackback a,
.commentlist li.pingback a {
.comment-list li.trackback a,
.comment-list li.pingback a {
color: #8c8c8c;
}
.comment-author a:hover,
.comment-meta a:hover,
.commentlist li.trackback a:hover,
.commentlist li.pingback a:hover {
.comment-list li.trackback a:hover,
.comment-list li.pingback a:hover {
color: #41a62a;
text-decoration: none;
}
@ -1887,15 +1904,15 @@ span > object {
content: '\007c\0020';
}
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback {
.comment-list li.trackback,
.comment-list li.pingback {
border-top: 1px solid rgba(0, 0, 0, 0.1);
margin-bottom: 24px;
margin-bottom: 2.4rem;
padding: 24px 10px 0;
padding: 2.4rem 1.0rem 0;
}
.commentlist li:first-child article {
.comment-list li:first-child article {
border: none;
}
.comments-area article {
@ -1958,7 +1975,7 @@ span > object {
.comment-content ol ul {
margin-bottom: 0;
}
.commentlist .children {
.comment-list .children {
list-style: none;
margin-left: 20px;
margin-left: 2.0rem;
@ -2315,7 +2332,7 @@ span > object {
}
/* Search widget */
#searchsubmit {
.search-submit {
display: none;
}
@ -2852,7 +2869,7 @@ img[src^="http://botd"] {
padding: 0 4.46428571%;
}
.page #primary .entry-header,
.error404 #primary .entry-header {
.error404 #primary .page-header {
margin: 0 4.59183673%;
padding: 0 4.46428571% 12px;
padding: 0 4.46428571% 1.2rem;
@ -2886,8 +2903,8 @@ img[src^="http://botd"] {
margin-top: 0;
}
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback {
.comment-list li.trackback,
.comment-list li.pingback {
margin-bottom: 36px;
margin-bottom: 3.6rem;
padding-top: 36px;
@ -2913,8 +2930,8 @@ img[src^="http://botd"] {
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
padding-right: 9.12778904%;
@ -2933,8 +2950,8 @@ img[src^="http://botd"] {
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-right: 6.04307432%;
padding-left: 6.04307432%;
}
@ -2987,7 +3004,7 @@ img[src^="http://botd"] {
margin: 1.2rem 8.03571428% 2.4rem 12.5%;
}
.page #primary .entry-header,
.error404 #primary .entry-header {
.error404 #primary .page-header {
margin: 0 8.03571428% 0 12.5%;
}
#primary .full-width .entry-header,
@ -3016,8 +3033,8 @@ img[src^="http://botd"] {
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
padding-right: 12.39493534%;
@ -3026,8 +3043,8 @@ img[src^="http://botd"] {
#comments #respond {
padding-right: 13.8900862%;
}
.commentlist,
.full-width .commentlist {
.comment-list,
.full-width .comment-list {
margin-left: -70px;
margin-left: -7.0rem;
}
@ -3040,8 +3057,8 @@ img[src^="http://botd"] {
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-right: 11.30926724%;
padding-left: 11.30926724%;
}
@ -3066,6 +3083,7 @@ img[src^="http://botd"] {
#page:before {
background-color: #000;
content: '';
display: block;
height: 100%;
min-height: 100%;
position: absolute;
@ -3119,13 +3137,15 @@ img[src^="http://botd"] {
margin: 0 0 0 -27.31707317%;
width: 24.87804878%;
}
#primary .entry-header {
#primary .entry-header,
#primary .page-header {
margin: -48px 4.59183673% 0;
margin: -4.8rem 4.59183673% 0;
padding: 24px 4.46428571% 12px;
padding: 2.4rem 4.46428571% 1.2rem;
}
#primary .entry-content,
#primary .page-content,
#primary .entry-summary {
margin: 0 4.59183673%;
padding: 12px 4.46428571% 0;
@ -3185,7 +3205,7 @@ img[src^="http://botd"] {
display: block;
}
.page #primary .entry-header,
.error404 #primary .entry-header {
.error404 #primary .page-header {
margin: 0 4.59183673%;
padding: 0 4.46428571% 12px;
padding: 0 4.46428571% 1.2rem;
@ -3200,6 +3220,7 @@ img[src^="http://botd"] {
}
#primary .full-width .entry-header,
#primary .full-width .entry-content,
#primary .full-width .page-content,
#primary .full-width footer.entry-meta {
margin: 0 5.882236%;
}
@ -3207,15 +3228,15 @@ img[src^="http://botd"] {
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
padding-right: 9.87001616%;
padding-left: 9.19765166%;
}
.commentlist,
.full-width .commentlist {
.comment-list,
.full-width .comment-list {
margin-left: 0;
}
.comment-navigation {
@ -3227,8 +3248,8 @@ img[src^="http://botd"] {
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-right: 5.882236%;
padding-left: 5.882236%;
}
@ -3282,11 +3303,13 @@ img[src^="http://botd"] {
}
@media screen and (min-width: 1150px) {
#primary .entry-header {
#primary .entry-header,
#primary .page-header {
margin: -48px 8.03571428% 0 12.5%;
margin: -4.8rem 8.03571428% 0 12.5%;
}
#primary .entry-content,
#primary .page-content,
#primary .entry-summary {
margin: 0 8.03571428% 0 12.5%;
}
@ -3298,8 +3321,8 @@ img[src^="http://botd"] {
.nocomments,
#comments #respond,
.comments-area article,
.commentlist li.trackback,
.commentlist li.pingback,
.comment-list li.trackback,
.comment-list li.pingback,
.post-navigation .nav-previous,
.post-navigation .nav-next {
padding-right: 12.44146986%;
@ -3308,8 +3331,8 @@ img[src^="http://botd"] {
#comments #respond {
padding-right: 13.73697916%;
}
.commentlist,
.full-width .commentlist {
.comment-list,
.full-width .comment-list {
margin-left: -70px;
margin-left: -7.0rem;
}
@ -3321,11 +3344,12 @@ img[src^="http://botd"] {
margin: 0 8.03571428% 2.4rem 12.5%;
}
.page #primary .entry-header,
.error404 #primary .entry-header {
.error404 #primary .page-header {
margin: 0 8.03571428% 0 12.5%;
}
#primary .full-width .entry-header,
#primary .full-width .entry-content,
#primary .full-width .page-content,
#primary .full-width footer.entry-meta {
margin: 0 11.21868265%;
}
@ -3335,8 +3359,8 @@ img[src^="http://botd"] {
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-right: 11.21868265%;
padding-left: 11.21868265%;
}
@ -3365,6 +3389,7 @@ img[src^="http://botd"] {
}
#primary .full-width .entry-header,
#primary .full-width .entry-content,
#primary .full-width .page-content,
#primary .full-width footer.entry-meta {
margin: 0 0 0 11.21868265%;
}
@ -3374,8 +3399,8 @@ img[src^="http://botd"] {
.full-width .comments-title,
.full-width #comments #respond,
.full-width .comments-area article,
.full-width .commentlist li.trackback,
.full-width .commentlist li.pingback {
.full-width .comment-list li.trackback,
.full-width .comment-list li.pingback {
padding-right: 0;
}
}