Ticket #24858: 24858.diff
File 24858.diff, 91.0 KB (added by , 11 years ago) |
---|
-
wp-content/themes/twentyfourteen/sidebar.php
8 8 ?> 9 9 <div id="secondary"> 10 10 <div id="secondary-top"> 11 <?php 12 $description = get_bloginfo( 'description' ); 13 if ( ! empty ( $description ) ) : ?> 11 <?php 12 $description = get_bloginfo( 'description' ); 13 if ( ! empty ( $description ) ) : 14 ?> 14 15 <h2 class="site-description"><?php echo esc_html( $description ); ?></h2> 15 <?php endif; ?>16 <?php endif; ?> 16 17 17 <?php if ( has_nav_menu( 'secondary' ) ) : ?>18 <nav role="navigation" class=" site-navigation secondary-navigation">18 <?php if ( has_nav_menu( 'secondary' ) ) : ?> 19 <nav role="navigation" class="navigation secondary-navigation"> 19 20 <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?> 20 21 </nav> 21 <?php endif; ?>22 <?php endif; ?> 22 23 </div> 23 24 24 25 <div id="secondary-bottom" class="widget-area" role="complementary"> 25 <?php do_action( 'before_sidebar' ); ?> 26 27 <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?> 28 <aside id="categories" class="widget widget_categories"> 29 <h1 class="widget-title"><?php _e( 'Categories', 'twentyfourteen' ); ?></h1> 30 <ul> 31 <?php wp_list_categories( array( 'title_li' => '' ) ); ?> 32 </ul> 33 </aside> 34 35 <aside id="archives" class="widget widget_archive"> 36 <h1 class="widget-title"><?php _e( 'Archives', 'twentyfourteen' ); ?></h1> 37 <ul> 38 <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?> 39 </ul> 40 </aside> 41 <?php endif; // end sidebar widget area ?> 26 <?php 27 do_action( 'before_sidebar' ); 28 dynamic_sidebar( 'sidebar-1' ); 29 ?> 42 30 </div><!-- .widget-area --> 43 31 </div><!-- #secondary --> -
wp-content/themes/twentyfourteen/content-featured-post.php
5 5 */ 6 6 ?> 7 7 8 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>9 <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">8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 9 <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(); ?>"> 10 10 <?php 11 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 1 ) ); 12 13 if ( '' != get_the_post_thumbnail() ) : 11 if ( has_post_thumbnail() ) : 14 12 the_post_thumbnail( 'featured-thumbnail-featured' ); 15 elseif ( $images ) : 16 $image = array_shift( $images ); 17 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' ); 18 else : ?> 19 <img src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" class="featured-thumbnail-featured" /><?php 13 14 else : 15 $images = get_children( array( 16 'post_parent' => get_the_ID(), 17 'post_type' => 'attachment', 18 'post_mime_type' => 'image', 19 'orderby' => 'menu_order', 20 'order' => 'ASC', 21 'numberposts' => 1, 22 ) ); 23 24 if ( $images ) : 25 $image = array_shift( $images ); 26 echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' ); 27 28 else : ?> 29 <img class="featured-thumbnail-featured" src="<?php echo get_template_directory_uri(); ?>/images/placeholder.png" alt="" /><?php 30 31 endif; 20 32 endif; 21 33 ?> 22 34 </a> 23 35 24 36 <div class="entry-wrap"> 25 37 <header class="entry-header"> 38 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 26 39 <div class="entry-meta"> 27 <?php 28 /* translators: used between list items, there is a space after the comma */ 29 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 30 if ( $categories_list && twentyfourteen_categorized_blog() ) : 31 ?> 32 <span class="cat-links"> 33 <?php echo $categories_list; ?> 34 </span> 35 <?php endif; // End if categories ?> 40 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 36 41 </div><!-- .entry-meta --> 37 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 42 <?php endif; ?> 43 44 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 38 45 </header><!-- .entry-header --> 39 46 40 <div class="entry-summary clearfix">47 <div class="entry-summary"> 41 48 <?php the_excerpt(); ?> 42 49 </div><!-- .entry-summary --> 43 50 </div> 44 45 </article><!-- #post-<?php the_ID(); ?> --> 46 No newline at end of file 51 </article><!-- #post-## --> -
wp-content/themes/twentyfourteen/archive.php
2 2 /** 3 3 * The template for displaying Archive pages. 4 4 * 5 * Used to display archive-type pages if nothing more specific matches a query. 6 * For example, puts together date-based pages if no date.php file exists. 7 * 8 * If you'd like to further customize these archive views, you may create a 9 * new template file for each specific one. For example, Twenty Fourteen 10 * already has tag.php for Tag archives, category.php for Category archives, 11 * and author.php for Author archives. 12 * 5 13 * Learn more: http://codex.wordpress.org/Template_Hierarchy 6 14 * 7 15 * @package WordPress … … 13 21 <section id="primary" class="content-area"> 14 22 <div id="content" class="site-content" role="main"> 15 23 16 <?php if ( have_posts() ) : ?>24 <?php if ( have_posts() ) : ?> 17 25 18 26 <header class="page-header"> 19 27 <h1 class="page-title"> 20 28 <?php 21 if ( is_category() ) { 22 printf( __( 'Category Archives: %s', 'twentyfourteen' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 23 24 } elseif ( is_tag() ) { 25 printf( __( 'Tag Archives: %s', 'twentyfourteen' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 29 if ( is_day() ) : 30 printf( __( 'Day: %s', 'twentyfourteen' ), get_the_date() ); 26 31 27 } elseif ( is_author() ) { 28 /* Queue the first post, that way we know 29 * what author we're dealing with (if that is the case). 30 */ 31 the_post(); 32 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>' ); 33 /* Since we called the_post() above, we need to 34 * rewind the loop back to the beginning that way 35 * we can run the loop properly, in full. 36 */ 37 rewind_posts(); 32 elseif ( is_month() ) : 33 printf( __( 'Month: %s', 'twentyfourteen' ), get_the_date( 'F Y' ) ); 38 34 39 } elseif ( is_day() ) {40 printf( __( ' Daily Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date() . '</span>');35 elseif ( is_year() ) : 36 printf( __( 'Year: %s', 'twentyfourteen' ), get_the_date( 'Y' ) ); 41 37 42 } elseif ( is_month() ) { 43 printf( __( 'Monthly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); 44 45 } elseif ( is_year() ) { 46 printf( __( 'Yearly Archives: %s', 'twentyfourteen' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); 47 48 } else { 38 else : 49 39 _e( 'Archives', 'twentyfourteen' ); 50 40 51 }41 endif; 52 42 ?> 53 43 </h1> 54 <?php55 if ( is_category() ) {56 // show an optional category description57 $category_description = category_description();58 if ( ! empty( $category_description ) )59 echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );60 61 } elseif ( is_tag() ) {62 // show an optional tag description63 $tag_description = tag_description();64 if ( ! empty( $tag_description ) )65 echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );66 }67 ?>68 44 </header><!-- .page-header --> 69 45 70 <?php while ( have_posts() ) : the_post(); ?> 46 <?php 47 while ( have_posts() ) : 48 the_post(); 71 49 72 <?php twentyfourteen_get_template_part(); ?> 50 twentyfourteen_get_template_part(); 51 endwhile; 52 twentyfourteen_content_nav( 'nav-below' ); 73 53 74 <?php endwhile; ?> 54 else : 55 get_template_part( 'no-results', 'archive' ); 75 56 76 <?php twentyfourteen_content_nav( 'nav-below' ); ?> 57 endif; 58 ?> 59 </div><!-- #content --> 60 </section><!-- #primary --> 77 61 78 <?php else : ?> 79 80 <?php get_template_part( 'no-results', 'archive' ); ?> 81 82 <?php endif; ?> 83 84 </div><!-- #content .site-content --> 85 </section><!-- #primary .content-area --> 86 87 <?php get_sidebar( 'content' ); ?> 88 89 <?php get_sidebar(); ?> 90 91 <?php get_footer(); ?> 92 No newline at end of file 62 <?php 63 get_sidebar( 'content' ); 64 get_sidebar(); 65 get_footer(); -
wp-content/themes/twentyfourteen/content.php
3 3 * @package WordPress 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 $format = get_post_format(); 6 7 7 ?> 8 8 9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>9 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 10 10 <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"> 11 <?php 12 if ( '' != get_the_post_thumbnail() ) 13 the_post_thumbnail( 'featured-thumbnail-large' ); 14 ?> 11 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 15 12 </a> 16 13 17 14 <header class="entry-header"> 18 <?php 19 /* translators: used between list items, there is a space after the comma */ 20 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 21 if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) : 22 ?> 15 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 23 16 <div class="entry-meta"> 24 <span class="cat-links"><?php echo $categories_list; ?></span>17 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 25 18 </div> 26 19 <?php endif; ?> 27 20 28 21 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 29 22 30 23 <div class="entry-meta"> 31 <?php if ( 'gallery' == $format) : ?>24 <?php if ( has_post_format( 'gallery' ) ) : ?> 32 25 <span class="post-format"> 33 <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>26 <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> 34 27 </span> 35 <?php endif; ?>36 37 28 <?php 29 endif; 30 38 31 if ( 'post' == get_post_type() ) 39 32 twentyfourteen_posted_on(); 40 ?>41 33 42 <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> 43 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 44 <?php endif; ?> 34 if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : 35 ?> 36 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 37 <?php 38 endif; 45 39 46 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> 40 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); 41 ?> 47 42 </div><!-- .entry-meta --> 48 43 </header><!-- .entry-header --> 49 44 50 45 <?php if ( is_search() ) : ?> 51 <div class="entry-summary clearfix">46 <div class="entry-summary"> 52 47 <?php the_excerpt(); ?> 53 48 </div><!-- .entry-summary --> 54 49 <?php else : ?> 55 <div class="entry-content clearfix"> 56 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); ?> 50 <div class="entry-content"> 57 51 <?php 52 the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); 58 53 wp_link_pages( array( 59 54 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 60 55 'after' => '</div>', 61 56 'link_before' => '<span>', 62 'link_after' => '</span>' 57 'link_after' => '</span>', 63 58 ) ); 64 59 ?> 65 60 </div><!-- .entry-content --> 66 61 <?php endif; ?> 67 62 68 <?php 69 $tag_list = get_the_tag_list(); 70 if ( '' != $tag_list && 'post' == get_post_type() ) : 71 ?> 72 <footer class="entry-meta"> 73 <span class="tag-links"><?php echo $tag_list; ?></span> 74 </footer><!-- .entry-meta --> 75 <?php endif; // End if $tag_list ?> 76 </article><!-- #post-<?php the_ID(); ?> --> 77 No newline at end of file 63 <?php if ( has_tag() ) : ?> 64 <footer class="entry-meta"> 65 <span class="tag-links"><?php echo get_the_tag_list(); ?></span> 66 </footer><!-- .entry-meta --> 67 <?php endif; ?> 68 </article><!-- #post-## --> -
wp-content/themes/twentyfourteen/functions.php
8 8 9 9 /** 10 10 * Set the content width based on the theme's design and stylesheet. 11 *12 11 */ 13 12 if ( ! isset( $content_width ) ) 14 13 $content_width = 474; /* pixels */ 15 14 16 15 function futher_set_content_width() { 17 global $content_width;18 16 if ( is_page_template( 'full-width-page.php' ) || is_attachment() ) 19 $ content_width= 895;17 $GLOBALS['content_width'] = 895; 20 18 } 21 19 add_action( 'template_redirect', 'futher_set_content_width' ); 22 20 … … 27 25 * Note that this function is hooked into the after_setup_theme hook, which runs 28 26 * before the init hook. The init hook is too late for some features, such as indicating 29 27 * support post thumbnails. 30 *31 28 */ 32 29 function twentyfourteen_setup() { 33 /**34 * Custom template tags for this theme.35 */36 require( get_template_directory() . '/inc/template-tags.php' );37 38 /**39 * Customizer additions40 */41 require( get_template_directory() . '/inc/customizer.php' );42 30 43 31 /** 44 32 * Make theme available for translation … … 81 69 /** 82 70 * This theme allows users to set a custom background. 83 71 */ 84 $args = apply_filters( 'twentyfourteen_custom_background_args', array( 'default-color' => 'f5f5f5' ) ); 85 86 if ( function_exists( 'wp_get_theme' ) ) { 87 add_theme_support( 'custom-background', $args ); 88 } else { 89 // Compat: Versions of WordPress prior to 3.4. 90 define( 'BACKGROUND_COLOR', $args['default-color'] ); 91 add_custom_background(); 92 } 72 add_theme_support( 'custom-background', apply_filters( 'twentyfourteen_custom_background_args', array( 73 'default-color' => 'f5f5f5', 74 ) ) ); 93 75 } 94 76 endif; // twentyfourteen_setup 95 77 add_action( 'after_setup_theme', 'twentyfourteen_setup' ); … … 112 94 if ( is_paged() ) 113 95 return false; 114 96 115 $minimum = absint( $minimum );116 97 $featured_posts = apply_filters( 'twentyfourteen_get_featured_posts', array() ); 117 98 118 if ( ! is_array( $featured_posts ) ) 119 return false; 120 121 if ( $minimum > count( $featured_posts ) ) 122 return false; 123 124 return true; 99 return is_array( $featured_posts ) && count( $featured_posts ) > absint( $minimum ); 125 100 } 126 101 127 102 /** … … 191 166 add_action( 'widgets_init', 'twentyfourteen_widgets_init' ); 192 167 193 168 /** 194 * Register Google fonts for Twenty Fourteen 169 * Register Google fonts for Twenty Fourteen. 195 170 * 196 171 */ 197 172 function twentyfourteen_fonts() { 198 173 /* translators: If there are characters in your language that are not supported 199 174 by Lato, translate this to 'off'. Do not translate into your own language. */ 200 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) { 201 202 $protocol = is_ssl() ? 'https' : 'http'; 203 204 wp_register_style( 'twentyfourteen-lato', "$protocol://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic", array(), null ); 205 } 175 if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) 176 wp_register_style( 'twentyfourteen-lato', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', array(), null ); 206 177 } 207 178 add_action( 'init', 'twentyfourteen_fonts' ); 208 179 … … 215 186 216 187 wp_enqueue_style( 'twentyfourteen-lato' ); 217 188 218 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {189 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) 219 190 wp_enqueue_script( 'comment-reply' ); 220 }221 191 222 if ( is_singular() && wp_attachment_is_image() ) {192 if ( is_singular() && wp_attachment_is_image() ) 223 193 wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); 224 }225 194 226 195 wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130402', true ); 227 196 } … … 231 200 * Enqueue Google fonts style to admin screen for custom header display. 232 201 * 233 202 */ 234 function twentyfourteen_admin_fonts( $hook_suffix ) { 235 if ( 'appearance_page_custom-header' != $hook_suffix ) 236 return; 237 203 function twentyfourteen_admin_fonts() { 238 204 wp_enqueue_style( 'twentyfourteen-lato' ); 239 205 } 240 add_action( 'admin_ enqueue_scripts', 'twentyfourteen_admin_fonts' );206 add_action( 'admin_print_scripts-appearance_page_custom-header', 'twentyfourteen_admin_fonts' ); 241 207 242 208 /** 243 209 * Implement the Custom Header feature … … 285 251 } 286 252 add_filter( 'get_the_excerpt', 'twentyfourteen_custom_excerpt_more' ); 287 253 254 if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) : 255 /** 256 * Prints the attached image with a link to the next attached image. 257 * 258 * @since Twenty Thirteen 1.0 259 * 260 * @return void 261 */ 262 function twentyfourteen_the_attached_image() { 263 $post = get_post(); 264 $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); 265 $next_attachment_url = wp_get_attachment_url(); 266 267 /** 268 * Grab the IDs of all the image attachments in a gallery so we can get the URL 269 * of the next adjacent image in a gallery, or the first image (if we're 270 * looking at the last image in a gallery), or, in a gallery of one, just the 271 * link to that image file. 272 */ 273 $attachment_ids = get_posts( array( 274 'post_parent' => $post->post_parent, 275 'fields' => 'ids', 276 'numberposts' => -1, 277 'post_status' => 'inherit', 278 'post_type' => 'attachment', 279 'post_mime_type' => 'image', 280 'order' => 'ASC', 281 'orderby' => 'menu_order ID' 282 ) ); 283 284 // If there is more than 1 attachment in a gallery... 285 if ( count( $attachment_ids ) > 1 ) { 286 foreach ( $attachment_ids as $attachment_id ) { 287 if ( $attachment_id == $post->ID ) { 288 $next_id = current( $attachment_ids ); 289 break; 290 } 291 } 292 293 // get the URL of the next image attachment... 294 if ( $next_id ) 295 $next_attachment_url = get_attachment_link( $next_id ); 296 297 // or get the URL of the first image attachment. 298 else 299 $next_attachment_url = get_attachment_link( array_shift( $attachment_ids ) ); 300 } 301 302 printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>', 303 esc_url( $next_attachment_url ), 304 the_title_attribute( array( 'echo' => false ) ), 305 wp_get_attachment_image( $post->ID, $attachment_size ) 306 ); 307 } 308 endif; 309 288 310 /** 289 311 * Count the number of footer sidebars to enable dynamic classes for the footer 290 312 * … … 328 350 } 329 351 330 352 if ( $class ) 331 echo 'class="clearfix ' . $class . '"';353 printf( 'class="%s"', $class ); 332 354 } 333 355 334 356 /** … … 443 465 444 466 return $title; 445 467 } 446 add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 ); 447 No newline at end of file 468 add_filter( 'wp_title', 'twentyfourteen_wp_title', 10, 2 ); 469 470 /** 471 * Custom template tags for this theme. 472 */ 473 require get_template_directory() . '/inc/template-tags.php'; 474 475 /** 476 * Customizer additions 477 */ 478 require get_template_directory() . '/inc/customizer.php'; -
wp-content/themes/twentyfourteen/featured-content.php
1 1 <div class="featured-content-wrapper"> 2 <div id="featured-content" class="featured-content clearfix">2 <div id="featured-content" class="featured-content"> 3 3 4 4 <?php 5 5 do_action( 'twentyfourteen_featured_posts_before' ); … … 7 7 $featured_posts = twentyfourteen_get_featured_posts(); 8 8 foreach ( (array) $featured_posts as $order => $post ) : 9 9 setup_postdata( $post ); 10 10 11 get_template_part( 'content', 'featured-post' ); 11 12 endforeach; 12 13 -
wp-content/themes/twentyfourteen/page.php
13 13 14 14 get_header(); ?> 15 15 16 <?php if ( is_front_page() ) : ?>17 18 <div class="front-page-content-wrapper">19 <div class="front-page-content-main">20 21 <?php if ( twentyfourteen_has_featured_posts() ) : ?>22 <?php get_template_part( 'featured-content' ); ?>23 <?php endif; ?>24 25 <div class="front-page-content-area clearfix">26 27 <div id="primary" class="content-area no-sidebar">28 <div id="content" class="site-content" role="main">29 <?php30 if ( have_posts() ) :31 while ( have_posts() ) :32 the_post();33 get_template_part( 'content', 'page' );34 comments_template( '', true );35 endwhile;36 37 twentyfourteen_content_nav( 'nav-below' );38 else :39 get_template_part( 'no-results', 'index' );40 endif;41 ?>42 </div><!-- #content .site-content -->43 </div><!-- #primary .content-area -->44 45 <?php get_template_part( 'recent-formatted-posts' ); ?>46 47 </div><!-- .front-page-content-area -->48 49 </div><!-- .front-page-content-main -->50 </div><!-- .front-page-content-wrapper -->51 52 <?php get_sidebar(); ?>53 54 <?php else : ?>55 56 16 <div id="primary" class="content-area"> 57 17 <div id="content" class="site-content" role="main"> 58 18 59 <?php while ( have_posts() ) : the_post(); ?>60 61 <?php get_template_part( 'content', 'page' ); ?>19 <?php 20 while ( have_posts() ) : 21 the_post(); 62 22 63 <?php comments_template( '', true ); ?>23 get_template_part( 'content', 'page' ); 64 24 65 <?php endwhile; ?> 25 // If comments are open or we have at least one comment, load up the comment template. 26 if ( comments_open() || get_comments_number() ) 27 comments_template(); 28 endwhile; 29 ?> 66 30 67 31 </div><!-- #content .site-content --> 68 32 </div><!-- #primary .content-area --> 69 33 70 <?php get_sidebar( 'content' ); ?> 71 72 <?php get_sidebar(); ?> 73 74 <?php endif; // is_front_page() check ?> 75 76 <?php get_footer(); ?> 34 <?php 35 get_sidebar( 'content' ); 36 get_sidebar(); 37 get_footer(); -
wp-content/themes/twentyfourteen/comments.php
2 2 /** 3 3 * The template for displaying Comments. 4 4 * 5 * The area of the page that contains both current comments 6 * and the comment form. The actual display of comments is 7 * handled by a callback to twentyfourteen_comment() which is 8 * located in the functions.php file. 5 * The area of the page that contains comments and the comment form. 9 6 * 10 7 * @package WordPress 11 8 * @subpackage Twenty_Fourteen 12 9 */ 13 ?>14 10 15 <?php 16 /* 17 * If the current post is protected by a password and 18 * the visitor has not yet entered the password we will 19 * return early without loading the comments. 20 */ 21 if ( post_password_required() ) 22 return; 11 /* 12 * If the current post is protected by a password and the visitor has not yet 13 * entered the password we will return early without loading the comments. 14 */ 15 if ( post_password_required() ) 16 return; 23 17 ?> 24 18 25 <div id="comments" class="comments-area"> 26 27 <?php // You can start editing here -- including this comment! ?> 19 <div id="comments" class="comments-area"> 28 20 29 21 <?php if ( have_comments() ) : ?> 30 <h2 class="comments-title">31 <?php32 printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyfourteen' ),33 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );34 ?>35 </h2>36 22 37 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 38 <nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation clearfix"> 39 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 40 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 41 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 42 </nav><!-- #comment-nav-above .site-navigation .comment-navigation --> 43 <?php endif; // check for comment navigation ?> 23 <h2 class="comments-title"> 24 <?php 25 printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyfourteen' ), 26 number_format_i18n( get_comments_number() ), get_the_title() ); 27 ?> 28 </h2> 44 29 45 <ol class="commentlist"> 46 <?php 47 /* Loop through and list the comments. Tell wp_list_comments() 48 * to use twentyfourteen_comment() to format the comments. 49 * If you want to overload this in a child theme then you can 50 * define twentyfourteen_comment() and that will be used instead. 51 * See twentyfourteen_comment() in inc/template-tags.php for more. 52 */ 53 wp_list_comments( array( 'callback' => 'twentyfourteen_comment' ) ); 54 ?> 55 </ol><!-- .commentlist --> 30 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> 31 <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> 32 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 33 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 34 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 35 </nav><!-- #comment-nav-above --> 36 <?php endif; // Check for comment navigation. ?> 56 37 57 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?> 58 <nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation clearfix"> 59 <h1 class="assistive-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 60 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 61 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 62 </nav><!-- #comment-nav-below .site-navigation .comment-navigation --> 63 <?php endif; // check for comment navigation ?> 38 <ol class="comment-list"> 39 <?php 40 wp_list_comments( array( 41 'style' => 'ol', 42 'short_ping' => true, 64 43 65 <?php endif; // have_comments() ?> 44 // TODO: Remove callback and update styles. 45 'callback'=>'twentyfourteen_comment', 46 ) ); 47 ?> 48 </ol><!-- .comment-list --> 49 50 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> 51 <nav id="comment-nav-below" class="navigation comment-navigation" role="navigation"> 52 <h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> 53 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> 54 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> 55 </nav><!-- #comment-nav-below --> 56 <?php endif; // Check for comment navigation. ?> 66 57 67 <?php 68 // If comments are closed and there are comments, let's leave a little note, shall we? 69 if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : 70 ?> 71 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p> 58 <?php if ( ! comments_open() ) : ?> 59 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p> 72 60 <?php endif; ?> 73 61 62 <?php endif; // have_comments() ?> 63 74 64 <?php comment_form(); ?> 75 65 76 </div><!-- #comments .comments-area-->66 </div><!-- #comments --> -
wp-content/themes/twentyfourteen/no-results.php
1 1 <?php 2 2 /** 3 * The template part for displaying a message that posts cannot be found. 4 * 5 * Learn more: http://codex.wordpress.org/Template_Hierarchy 3 * The template for displaying a "No posts found" message. 6 4 * 7 5 * @package WordPress 8 6 * @subpackage Twenty_Fourteen 9 7 */ 10 8 ?> 11 9 12 <article id="post-0" class="post no-results not-found"> 13 <header class="entry-header"> 14 <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1> 15 </header><!-- .entry-header --> 10 <header class="page-header"> 11 <h1 class="page-title"><?php _e( 'Nothing Found', 'twentyfourteen' ); ?></h1> 12 </header> 16 13 17 <div class="entry-content">18 14 <div class="page-content"> 15 <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?> 19 16 20 17 <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfourteen' ), admin_url( 'post-new.php' ) ); ?></p> 21 18 22 19 <?php elseif ( is_search() ) : ?> 23 20 24 25 21 <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentyfourteen' ); ?></p> 22 <?php get_search_form(); ?> 26 23 27 24 <?php else : ?> 28 25 29 30 26 <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentyfourteen' ); ?></p> 27 <?php get_search_form(); ?> 31 28 32 <?php endif; ?> 33 </div><!-- .entry-content --> 34 </article><!-- #post-0 .post .no-results .not-found --> 29 <?php endif; ?> 30 </div><!-- .page-content --> -
wp-content/themes/twentyfourteen/content-post-format.php
3 3 * @package WordPress 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 $format = get_post_format();7 6 ?> 8 7 9 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>8 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 10 9 <?php 11 if ( 'gallery' == $format) :12 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) );10 if ( has_post_format( 'gallery' ) ) : 11 $images = get_children( array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) ); 13 12 if ( $images ) : 14 $image = array_shift( $images ); ?> 15 <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"> 16 <?php echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?> 17 </a><?php 13 $image = array_shift( $images ); 14 ?> 15 <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"> 16 <?php echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-large' ); ?> 17 </a> 18 <?php 18 19 endif; 19 20 endif; 20 21 ?> 21 22 22 23 <header class="entry-header"> 23 <?php 24 /* translators: used between list items, there is a space after the comma */ 25 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 26 if ( $categories_list && twentyfourteen_categorized_blog() && 'post' == get_post_type() ) : 27 ?> 24 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 28 25 <div class="entry-meta"> 29 <span class="cat-links"><?php echo $categories_list; ?></span>30 </div> 26 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 27 </div><!-- .entry-meta --> 31 28 <?php endif; ?> 32 29 33 <?php 34 /* Show title only if it exsits */ 35 the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); 36 ?> 30 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 37 31 38 32 <div class="entry-meta"> 39 33 <span class="post-format"> … … 43 37 <?php 44 38 if ( 'post' == get_post_type() ) 45 39 twentyfourteen_posted_on(); 46 ?>47 40 48 <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?> 49 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 41 if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : 42 ?> 43 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 50 44 <?php endif; ?> 51 45 52 46 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> 53 47 </div><!-- .entry-meta --> 54 48 </header><!-- .entry-header --> 55 49 56 <div class="entry-content clearfix"> 57 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); ?> 50 <div class="entry-content"> 58 51 <?php 52 the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) ); 59 53 wp_link_pages( array( 60 54 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 61 55 'after' => '</div>', 62 56 'link_before' => '<span>', 63 'link_after' => '</span>' 57 'link_after' => '</span>', 64 58 ) ); 65 59 ?> 66 60 </div><!-- .entry-content --> 67 61 68 62 <footer class="entry-meta"> 69 <?php if ( ( 'quote' == $format ) || ( 'aside' == $format) ) : ?>63 <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?> 70 64 <div class="entry-meta"> 71 <?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>65 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 72 66 </div> 73 67 <?php endif; ?> 74 68 75 <?php 76 $tag_list = get_the_tag_list(); 77 if ( '' != $tag_list && 'post' == get_post_type() ) : 78 ?> 79 <span class="tag-links"><?php echo $tag_list; ?></span> 80 <?php endif; // End if $tag_list ?> 69 <?php if ( has_tag() ) : ?> 70 <span class="tag-links"><?php echo get_the_tag_list(); ?></span> 71 <?php endif; ?> 81 72 </footer><!-- .entry-meta --> 82 83 </article><!-- #post-<?php the_ID(); ?> --> 84 No newline at end of file 73 </article><!-- #post-## --> -
wp-content/themes/twentyfourteen/content-recent-formatted-post.php
6 6 if ( isset( $GLOBALS['content_width'] ) ) 7 7 $GLOBALS['content_width'] = 306; 8 8 9 $format = get_post_format(); 10 if ( false === $format ) 11 $format = 'standard'; 9 $images = get_posts( array( 10 'post_parent' => get_post()->post_parent, 11 'fields' => 'ids', 12 'numberposts' => -1, 13 'post_status' => 'inherit', 14 'post_type' => 'attachment', 15 'post_mime_type' => 'image', 16 'order' => 'ASC', 17 'orderby' => 'menu_order ID' 18 ) ); 19 $total_images = count( $images ); 12 20 ?> 13 21 14 <article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix'); ?>>15 <div class="entry-content clearfix">22 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 23 <div class="entry-content"> 16 24 <?php 17 if ( 'gallery' == $format ) : 18 $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' ); 19 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC' ) ); 20 if ( $images ) : 21 $total_images = count( $images ); 22 if ( empty( $featured_image ) ) { 23 $image = array_shift( $images ); 24 $featured_image = wp_get_attachment_image( $image->ID, 'featured-thumbnail-formatted' ); 25 } 25 if ( has_post_format( 'gallery' ) ) : 26 if ( has_post_thumbnail() ) : 27 $featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' ); 28 elseif ( $total_images > 0 ) : 29 $image = array_shift( $images ); 30 $featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' ); 26 31 ?> 27 <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a> 28 <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' ), 29 'href="' . get_permalink() . '" title="' . esc_attr( sprintf( __( 'Permalink to %s', 'twentyfourteen' ), the_title_attribute( 'echo=0' ) ) ) . '" rel="bookmark"', 32 <a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a> 33 <p class="wp-caption-text"> 34 <?php 35 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' ), 36 esc_url( get_permalink() ), 30 37 number_format_i18n( $total_images ) 31 ); ?></p><?php 38 ); 39 ?> 40 </p> 41 <?php 32 42 else : 33 43 the_excerpt(); 34 44 endif; … … 41 51 <header class="entry-header"> 42 52 <div class="entry-meta"> 43 53 <?php 44 if ( 'link' != $format) :45 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>' );54 if ( ! has_post_format( 'link' ) ) : 55 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); 46 56 endif; 57 58 twentyfourteen_posted_on(); 59 60 if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : 47 61 ?> 48 <?php twentyfourteen_posted_on(); ?>49 <?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>50 62 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 51 63 <?php endif; ?> 52 64 </div><!-- .entry-meta --> 53 65 </header><!-- .entry-header --> 54 </article> 55 No newline at end of file 66 </article><!-- #post-## --> -
wp-content/themes/twentyfourteen/inc/custom-header.php
22 22 * @subpackage Twenty_Fourteen 23 23 */ 24 24 function twentyfourteen_custom_header_setup() { 25 $args = array( 26 'default-image' => '', 25 add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array( 27 26 'default-text-color' => 'fff', 28 27 'width' => 1260, 29 28 'height' => 240, … … 31 30 'wp-head-callback' => 'twentyfourteen_header_style', 32 31 'admin-head-callback' => 'twentyfourteen_admin_header_style', 33 32 'admin-preview-callback' => 'twentyfourteen_admin_header_image', 34 ); 35 36 $args = apply_filters( 'twentyfourteen_custom_header_args', $args ); 33 ) ) ); 37 34 38 if ( function_exists( 'wp_get_theme' ) ) {39 add_theme_support( 'custom-header', $args );40 } else {41 // Compat: Versions of WordPress prior to 3.4.42 define( 'HEADER_TEXTCOLOR', $args['default-text-color'] );43 define( 'HEADER_IMAGE', $args['default-image'] );44 define( 'HEADER_IMAGE_WIDTH', $args['width'] );45 define( 'HEADER_IMAGE_HEIGHT', $args['height'] );46 add_custom_image_header( $args['wp-head-callback'], $args['admin-head-callback'], $args['admin-preview-callback'] );47 }48 35 } 49 36 add_action( 'after_setup_theme', 'twentyfourteen_custom_header_setup' ); 50 37 51 /**52 * Shiv for get_custom_header().53 *54 * get_custom_header() was introduced to WordPress55 * in version 3.4. To provide backward compatibility56 * with previous versions, we will define our own version57 * of this function.58 *59 * @todo Remove this function when WordPress 3.6 is released.60 * @return stdClass All properties represent attributes of the curent header image.61 *62 * @package WordPress63 * @subpackage Twenty_Fourteen64 */65 66 if ( ! function_exists( 'get_custom_header' ) ) {67 function get_custom_header() {68 return (object) array(69 'url' => get_header_image(),70 'thumbnail_url' => get_header_image(),71 'width' => HEADER_IMAGE_WIDTH,72 'height' => HEADER_IMAGE_HEIGHT,73 );74 }75 }76 77 38 if ( ! function_exists( 'twentyfourteen_header_style' ) ) : 78 39 /** 79 40 * Styles the header image and text displayed on the blog … … 82 43 * 83 44 */ 84 45 function twentyfourteen_header_style() { 46 $header_text_color = get_header_textcolor(); 85 47 86 48 // If no custom options for text are set, let's bail 87 // get_header_textcolor()options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value88 if ( HEADER_TEXTCOLOR == get_header_textcolor())49 // $header_text_color options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value 50 if ( HEADER_TEXTCOLOR == $header_text_color ) 89 51 return; 90 52 // If we get this far, we have custom styles. Let's do this. 91 53 ?> 92 54 <style type="text/css"> 93 55 <?php 94 56 // Has the text been hidden? 95 if ( 'blank' == get_header_textcolor()) :57 if ( 'blank' == $header_text_color ) : 96 58 ?> 97 59 .site-title { 98 60 position: absolute !important; … … 104 66 else : 105 67 ?> 106 68 .site-title a { 107 color: #<?php echo get_header_textcolor(); ?> !important;69 color: #<?php echo $header_text_color; ?> !important; 108 70 } 109 71 <?php endif; ?> 110 72 </style> … … 153 115 * @see twentyfourteen_custom_header_setup(). 154 116 * 155 117 */ 156 function twentyfourteen_admin_header_image() { ?> 118 function twentyfourteen_admin_header_image() { 119 $header_image = get_header_image(); 120 ?> 157 121 <div id="headimg"> 158 <?php 159 if ( 'blank' == get_header_textcolor() || '' == get_header_textcolor() ) 160 $style = ' style="display:none;"'; 161 else 162 $style = ' style="color:#' . get_header_textcolor() . ';"'; 163 ?> 164 <?php $header_image = get_header_image(); 165 if ( ! empty( $header_image ) ) : ?> 166 <img src="<?php echo esc_url( $header_image ); ?>" alt="" /> 122 <?php if ( ! empty( $header_image ) ) : ?> 123 <img src="<?php echo esc_url( $header_image ); ?>" alt=""> 167 124 <?php endif; ?> 168 <h1 ><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>125 <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> 169 126 </div> 170 <?php }171 endif; // twentyfourteen_admin_header_image 172 No newline at end of file127 <?php 128 } 129 endif; // twentyfourteen_admin_header_image -
wp-content/themes/twentyfourteen/inc/customizer.php
184 184 function twentyfourteen_customize_preview_js() { 185 185 wp_enqueue_script( 'twentyfourteen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20120827', true ); 186 186 } 187 add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' ); 188 No newline at end of file 187 add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' ); -
wp-content/themes/twentyfourteen/inc/template-tags.php
35 35 36 36 ?> 37 37 <nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>"> 38 <h1 class=" assistive-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>38 <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1> 39 39 40 40 <?php if ( is_single() ) : // navigation links for single posts ?> 41 41 … … 182 182 delete_transient( 'all_the_cool_cats' ); 183 183 } 184 184 add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' ); 185 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );185 add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); 186 186 187 187 /** 188 188 * Include the Post-Format-specific template for the content. 189 189 * This is called in index.php and single.php 190 190 */ 191 191 function twentyfourteen_get_template_part() { 192 193 $format = get_post_format(); 194 195 switch( $format ) { 196 case 'aside': 197 case 'quote': 198 case 'link': 199 case 'video': 200 case 'image': 201 get_template_part( 'content', 'post-format' ); 202 break; 203 default: 204 get_template_part( 'content', get_post_format() ); 205 break; 206 } 207 208 } 209 No newline at end of file 192 if ( has_post_format( array( 'aside', 'quote', 'link', 'video', 'image' ) ) ) 193 get_template_part( 'content', 'post-format' ); 194 else 195 get_template_part( 'content', get_post_format() ); 196 } -
wp-content/themes/twentyfourteen/content-single.php
3 3 * @package WordPress 4 4 * @subpackage Twenty_Fourteen 5 5 */ 6 $format = get_post_format(); 7 if ( false === $format ) 8 $format = 'standard'; 6 has_post_format() 9 7 ?> 10 8 11 9 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 12 <?php if ( ( 'video' != $format ) && ( 'image' != $format ) && ( 'aside' != $format ) && ( 'link' != $format ) && ( 'quote' != $format) ) : ?>10 <?php if ( has_post_thumbnail() && ! has_post_format( array( 'video', 'image', 'aside', 'link', 'quote' ) ) ) : ?> 13 11 <div class="attachment-featured-thumbnail"> 14 <?php 15 if ( '' != get_the_post_thumbnail() ) 16 the_post_thumbnail( 'featured-thumbnail-large' ); 17 ?> 12 <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> 18 13 </div> 19 14 <?php endif; ?> 20 15 21 16 <header class="entry-header"> 17 <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> 22 18 <div class="entry-meta"> 23 <?php 24 /* translators: used between list items, there is a space after the comma */ 25 $categories_list = get_the_category_list( __( ', ', 'twentyfourteen' ) ); 26 if ( $categories_list && twentyfourteen_categorized_blog() ) : 27 ?> 28 <span class="cat-links"> 29 <?php echo $categories_list; ?> 30 </span> 31 <?php endif; // End if categories ?> 19 <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> 32 20 </div><!-- .entry-meta --> 21 <?php 22 endif; 33 23 34 <?php if ( ( 'standard' == $format ) || ( 'video' == $format ) || ( 'image' == $format ) || ( 'gallery' == $format ) ) : ?> 35 <h1 class="entry-title"><?php the_title(); ?></h1> 36 <?php endif; ?> 24 if ( ! has_post_format( array( 'status', 'chat', 'aside', 'link', 'quote', 'audio' ) ) ) : 25 the_title( '<h1 class="entry-title">', '</h1>' ); 26 endif; 27 ?> 37 28 38 29 <div class="entry-meta"> 39 <?php if ( 'standard' != $format) : ?>30 <?php if ( has_post_format() ) : ?> 40 31 <span class="post-format"> 41 32 <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> 42 33 </span> … … 44 35 45 36 <?php twentyfourteen_posted_on(); ?> 46 37 47 <?php if ( ! post_password_required() && ( comments_open() || '0' !=get_comments_number() ) ) : ?>38 <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : ?> 48 39 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ), __( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span> 49 40 <?php endif; ?> 50 41 … … 52 43 </div><!-- .entry-meta --> 53 44 </header><!-- .entry-header --> 54 45 55 <div class="entry-content clearfix"> 56 <?php the_content(); ?> 46 <div class="entry-content"> 57 47 <?php 48 the_content(); 58 49 wp_link_pages( array( 59 50 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 60 51 'after' => '</div>', 61 52 'link_before' => '<span>', 62 'link_after' => '</span>' 53 'link_after' => '</span>', 63 54 ) ); 64 55 ?> 65 56 </div><!-- .entry-content --> 66 57 67 58 <footer class="entry-meta"> 68 <?php if ( ( 'quote' == $format ) || ( 'aside' == $format) ) : ?>59 <?php if ( has_post_format( array( 'quote', 'aside' ) ) ) : ?> 69 60 <div class="entry-meta"> 70 <?php the_title( '<h1 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h1>' ); ?>61 <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> 71 62 </div><!-- .entry-meta --> 72 63 <?php endif; ?> 73 64 74 <?php 75 $tag_list = get_the_tag_list(); 76 if ( '' != $tag_list ) : 77 ?> 65 <?php if ( has_tag() ) : ?> 78 66 <span class="tag-links"> 79 <?php echo $tag_list; ?>67 <?php echo get_the_tag_list(); ?> 80 68 </span> 81 <?php endif; // End if $tag_list?>69 <?php endif; ?> 82 70 </footer><!-- .entry-meta --> 83 </article><!-- #post- <?php the_ID(); ?>-->71 </article><!-- #post-## --> -
wp-content/themes/twentyfourteen/search.php
11 11 <section id="primary" class="content-area"> 12 12 <div id="content" class="site-content" role="main"> 13 13 14 <?php if ( have_posts() ) : ?>14 <?php if ( have_posts() ) : ?> 15 15 16 16 <header class="page-header"> 17 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), '<span>' . get_search_query() . '</span>'); ?></h1>17 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1> 18 18 </header><!-- .page-header --> 19 19 20 <?php while ( have_posts() ) : the_post(); ?>21 22 <?php twentyfourteen_get_template_part(); ?>20 <?php 21 while ( have_posts() ) : 22 the_post(); 23 23 24 <?php endwhile; ?> 24 twentyfourteen_get_template_part(); 25 endwhile; 25 26 26 <?php twentyfourteen_content_nav( 'nav-below' ); ?>27 twentyfourteen_content_nav( 'nav-below' ); 27 28 28 <?php else : ?> 29 else : 30 get_template_part( 'no-results', 'search' ); 29 31 30 <?php get_template_part( 'no-results', 'search' ); ?> 32 endif; 33 ?> 31 34 32 <?php endif; ?> 35 </div><!-- #content --> 36 </section><!-- #primary --> 33 37 34 </div><!-- #content .site-content --> 35 </section><!-- #primary .content-area --> 36 37 <?php get_sidebar( 'content' ); ?> 38 39 <?php get_sidebar(); ?> 40 41 <?php get_footer(); ?> 42 No newline at end of file 38 <?php 39 get_sidebar( 'content' ); 40 get_sidebar(); 41 get_footer(); -
wp-content/themes/twentyfourteen/front-page.php
1 <?php 2 /** 3 * The template for displaying the home page. 4 * 5 * @package WordPress 6 * @subpackage Twenty_Fourteen 7 */ 8 9 get_header(); ?> 10 11 <div class="front-page-content-wrapper"> 12 <div class="front-page-content-main"> 13 14 <?php if ( twentyfourteen_has_featured_posts() ) : ?> 15 <?php get_template_part( 'featured-content' ); ?> 16 <?php endif; ?> 17 18 <div class="front-page-content-area"> 19 20 <div id="primary" class="content-area no-sidebar"> 21 <div id="content" class="site-content" role="main"> 22 <?php 23 if ( have_posts() ) : 24 while ( have_posts() ) : 25 the_post(); 26 27 twentyfourteen_get_template_part(); 28 29 comments_template(); 30 endwhile; 31 32 twentyfourteen_content_nav( 'nav-below' ); 33 34 else : 35 get_template_part( 'no-results', 'index' ); 36 37 endif; 38 ?> 39 </div><!-- #content .site-content --> 40 </div><!-- #primary .content-area --> 41 42 <?php get_template_part( 'recent-formatted-posts' ); ?> 43 44 </div><!-- .front-page-content-area --> 45 46 </div><!-- .front-page-content-main --> 47 </div><!-- .front-page-content-wrapper --> 48 49 <?php 50 get_sidebar(); 51 get_footer(); -
wp-content/themes/twentyfourteen/searchform.php
6 6 * @subpackage Twenty_Fourteen 7 7 */ 8 8 ?> 9 <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search"> 10 <label for="s" class="assistive-text"><?php _e( 'Search', 'twentyfourteen' ); ?></label> 11 <input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php esc_attr_e( 'Search …', 'twentyfourteen' ); ?>" /> 12 <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyfourteen' ); ?>" /> 13 </form> 9 <form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 10 <label> 11 <span class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?></span> 12 <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'twentyfourteen' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php _ex( 'Search for:', 'label', 'twentyfourteen' ); ?>"> 13 </label> 14 <input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentyfourteen' ); ?>"> 15 </form> -
wp-content/themes/twentyfourteen/index.php
14 14 15 15 get_header(); ?> 16 16 17 <?php if ( is_front_page() ) : ?>18 19 <div class="front-page-content-wrapper">20 <div class="front-page-content-main">21 22 <?php if ( twentyfourteen_has_featured_posts() ) : ?>23 <?php get_template_part( 'featured-content' ); ?>24 <?php endif; ?>25 26 <div class="front-page-content-area clearfix">27 28 <div id="primary" class="content-area no-sidebar">29 <div id="content" class="site-content" role="main">30 <?php31 if ( have_posts() ) :32 while ( have_posts() ) :33 the_post();34 twentyfourteen_get_template_part();35 endwhile;36 37 twentyfourteen_content_nav( 'nav-below' );38 else :39 get_template_part( 'no-results', 'index' );40 endif;41 ?>42 </div><!-- #content .site-content -->43 </div><!-- #primary .content-area -->44 45 <?php get_template_part( 'recent-formatted-posts' ); ?>46 47 </div><!-- .front-page-content-area -->48 49 </div><!-- .front-page-content-main -->50 </div><!-- .front-page-content-wrapper -->51 52 <?php get_sidebar(); ?>53 54 <?php else : ?>55 56 17 <div id="primary" class="content-area"> 57 18 <div id="content" class="site-content" role="main"> 58 19 59 <?php if ( have_posts() ) : ?> 20 <?php 21 if ( have_posts() ) : 22 while ( have_posts() ) : 23 the_post(); 60 24 61 <?php while ( have_posts() ) : the_post(); ?> 25 twentyfourteen_get_template_part(); 26 endwhile; 27 twentyfourteen_content_nav( 'nav-below' ); 62 28 63 <?php twentyfourteen_get_template_part(); ?> 29 else : 30 get_template_part( 'no-results', 'index' ); 64 31 65 <?php endwhile; ?> 32 endif; 33 ?> 66 34 67 <?php twentyfourteen_content_nav( 'nav-below' ); ?> 35 </div><!-- #content --> 36 </div><!-- #primary --> 68 37 69 <?php else : ?> 70 71 <?php get_template_part( 'no-results', 'index' ); ?> 72 73 <?php endif; ?> 74 75 </div><!-- #content .site-content --> 76 </div><!-- #primary .content-area --> 77 78 <?php get_sidebar( 'content' ); ?> 79 80 <?php get_sidebar(); ?> 81 82 <?php endif; // is_front_page() check ?> 83 84 <?php get_footer(); ?> 38 <?php 39 get_sidebar( 'content' ); 40 get_sidebar(); 41 get_footer(); -
wp-content/themes/twentyfourteen/header.php
10 10 ?><!DOCTYPE html> 11 11 <html <?php language_attributes(); ?> class="no-js"> 12 12 <head> 13 <script>14 /**15 * Replaces class "no-js" with "js" in the <html>-tag when JavaScript is being used.16 * Allows easy styling for browsers [not] supporting/running JavaScript.17 */18 document.documentElement.className = document.documentElement.className.replace(/(\s|^)no-js(\s|$)/, '$1js$2');19 </script>20 13 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 21 14 <meta name="viewport" content="width=device-width" /> 22 15 <title><?php wp_title( '|', true, 'right' ); ?></title> … … 59 52 <?php do_action( 'before' ); ?> 60 53 61 54 <?php $header_image = get_header_image(); 62 if ( ! empty( $header_image ) ) {?>55 if ( ! empty( $header_image ) ) : ?> 63 56 <div id="site-header"> 64 57 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> 65 58 <img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> 66 59 </a> 67 60 </div> 68 <?php }?>61 <?php endif; ?> 69 62 70 <header id="masthead" class="site-header clearfix" role="banner">71 <div class="header-main clear fix">63 <header id="masthead" class="site-header" role="banner"> 64 <div class="header-main clear"> 72 65 <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> 73 66 74 67 <div class="header-extra"> … … 84 77 </div> 85 78 86 79 <nav role="navigation" class="site-navigation primary-navigation"> 87 <h1 class=" assistive-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1>88 <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>80 <h1 class="screen-reader-text"><?php _e( 'Primary Menu', 'twentyfourteen' ); ?></h1> 81 <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> 89 82 <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?> 90 83 </nav> 91 84 … … 95 88 96 89 <?php if ( $social_links ) : ?> 97 90 <div class="social-links-wrapper hide"> 98 <ul class="social-links clear fix">91 <ul class="social-links clear"> 99 92 <?php if ( is_email( $email_link ) ) : ?> 100 93 <li class="email-link"> 101 94 <a href="mailto:<?php echo antispambot( sanitize_email( $email_link ) ); ?>" class="genericon" title="<?php esc_attr_e( 'Email', 'twentyfourteen' ); ?>" target="_blank"> … … 188 181 <?php endif; ?> 189 182 190 183 <div class="search-box-wrapper hide"> 191 <div class="search-box clear fix">184 <div class="search-box clear"> 192 185 <?php get_search_form(); ?> 193 186 </div> 194 187 </div> 195 </header><!-- #masthead .site-header-->188 </header><!-- #masthead --> 196 189 197 <div id="main" class="site-main clearfix"> 198 No newline at end of file 190 <div id="main" class="site-main"> -
wp-content/themes/twentyfourteen/footer.php
2 2 /** 3 3 * The template for displaying the footer. 4 4 * 5 * Contains the closing of the id=main div and all content after5 * Contains footer content and the closing of the #main and #page div elements. 6 6 * 7 7 * @package WordPress 8 8 * @subpackage Twenty_Fourteen 9 9 */ 10 10 ?> 11 11 12 </div><!-- #main .site-main -->12 </div><!-- #main --> 13 13 14 <?php get_sidebar( 'footer' ); ?>14 <?php get_sidebar( 'footer' ); ?> 15 15 16 <footer id="colophon" class="site-footer" role="contentinfo">17 <div class="site-info">18 <?php do_action( 'twentyfourteen_credits' ); ?>19 <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>20 </div><!-- .site-info -->21 </footer><!-- #colophon .site-footer-->22 </div><!-- #page .hfeed .site -->16 <footer id="colophon" class="site-footer" role="contentinfo"> 17 <div class="site-info"> 18 <?php do_action( 'twentyfourteen_credits' ); ?> 19 <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> 20 </div><!-- .site-info --> 21 </footer><!-- #colophon --> 22 </div><!-- #page --> 23 23 24 <?php wp_footer(); ?> 25 24 <?php wp_footer(); ?> 26 25 </body> 27 26 </html> 27 No newline at end of file -
wp-content/themes/twentyfourteen/404.php
11 11 <div id="primary" class="content-area"> 12 12 <div id="content" class="site-content" role="main"> 13 13 14 <article id="post-0" class="post error404 not-found"> 15 <header class="entry-header"> 16 <h1 class="entry-title"><?php _e( 'Oops! That page can’t be found.', 'twentyfourteen' ); ?></h1> 17 </header><!-- .entry-header --> 18 19 <div class="entry-content"> 20 <p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'twentyfourteen' ); ?></p> 21 22 <?php get_search_form(); ?> 23 24 </div><!-- .entry-content --> 25 </article><!-- #post-0 .post .error404 .not-found --> 14 <header class="page-header"> 15 <h1 class="page-title"><?php _e( "Oops! That page can't be found.", 'twentyfourteen' ); ?></h1> 16 </header> 26 17 27 </div><!-- #content .site-content -->28 </div><!-- #primary .content-area -->18 <div class="page-content"> 19 <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p> 29 20 30 <?php get_sidebar( 'content' ); ?> 21 <?php get_search_form(); ?> 22 </div><!-- .page-content --> 31 23 32 <?php get_sidebar(); ?> 24 </div><!-- #content --> 25 </div><!-- #primary --> 33 26 34 <?php get_footer(); ?> 35 No newline at end of file 27 <?php 28 get_sidebar( 'content' ); 29 get_sidebar(); 30 get_footer(); -
wp-content/themes/twentyfourteen/single.php
10 10 11 11 <div id="primary" class="content-area"> 12 12 <div id="content" class="site-content" role="main"> 13 14 <?php while ( have_posts() ) : the_post(); ?>15 16 <?php get_template_part( 'content', 'single' ); ?>17 18 <?php twentyfourteen_content_nav( 'nav-below' ); ?>19 20 13 <?php 21 // If comments are open or we have at least one comment, load up the comment template 22 if ( comments_open() || '0' != get_comments_number() ) 23 comments_template( '', true ); 24 ?> 25 26 <?php endwhile; // end of the loop. ?> 14 while ( have_posts() ) : 15 the_post(); 27 16 28 </div><!-- #content .site-content --> 29 </div><!-- #primary .content-area --> 17 get_template_part( 'content', 'single' ); 30 18 31 <?php get_sidebar( 'content' ); ?> 19 twentyfourteen_content_nav( 'nav-below' ); 32 20 33 <?php get_sidebar(); ?> 21 // If comments are open or we have at least one comment, load up the comment template. 22 if ( comments_open() || get_comments_number() ) 23 comments_template(); 24 endwhile; 25 ?> 26 </div><!-- #content --> 27 </div><!-- #primary --> 34 28 35 <?php get_footer(); ?> 36 No newline at end of file 29 <?php 30 get_sidebar( 'content' ); 31 get_sidebar(); 32 get_footer(); -
wp-content/themes/twentyfourteen/image.php
9 9 get_header(); 10 10 ?> 11 11 12 < divid="primary" class="content-area image-attachment">12 <section id="primary" class="content-area image-attachment"> 13 13 <div id="content" class="site-content full-width" role="main"> 14 14 15 15 <?php while ( have_posts() ) : the_post(); ?> 16 16 17 17 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 18 18 <header class="entry-header"> 19 < h1 class="entry-title"><?php the_title(); ?></h1>19 <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> 20 20 21 21 <div class="entry-meta"> 22 22 <?php $metadata = wp_get_attachment_metadata(); ?> … … 31 31 </header><!-- .entry-header --> 32 32 33 33 <div class="entry-content"> 34 35 34 <div class="entry-attachment"> 36 35 <div class="attachment"> 37 <?php 38 /** 39 * 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, 40 * 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 41 */ 42 $attachments = array_values( get_children( array( 43 'post_parent' => $post->post_parent, 44 'post_status' => 'inherit', 45 'post_type' => 'attachment', 46 'post_mime_type' => 'image', 47 'order' => 'ASC', 48 'orderby' => 'menu_order ID' 49 ) ) ); 50 foreach ( $attachments as $k => $attachment ) { 51 if ( $attachment->ID == $post->ID ) 52 break; 53 } 54 $k++; 55 // If there is more than 1 attachment in a gallery 56 if ( count( $attachments ) > 1 ) { 57 if ( isset( $attachments[ $k ] ) ) 58 // get the URL of the next image attachment 59 $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); 60 else 61 // or get the URL of the first image attachment 62 $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); 63 } else { 64 // or, if there's only 1 image, get the URL of the image 65 $next_attachment_url = wp_get_attachment_url(); 66 } 67 ?> 68 69 <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php 70 $attachment_size = apply_filters( 'twentyfourteen_attachment_size', array( 1200, 1200 ) ); // Filterable image size. 71 echo wp_get_attachment_image( $post->ID, $attachment_size ); 72 ?></a> 36 <?php twentyfourteen_the_attached_image(); ?> 73 37 </div><!-- .attachment --> 74 38 75 <?php if ( ! empty( $post->post_excerpt) ) : ?>39 <?php if ( has_excerpt() ) : ?> 76 40 <div class="entry-caption"> 77 41 <?php the_excerpt(); ?> 78 42 </div><!-- .entry-caption --> 79 43 <?php endif; ?> 80 44 </div><!-- .entry-attachment --> 81 45 82 <?php the_content(); ?>83 46 <?php 47 the_content(); 84 48 wp_link_pages( array( 85 49 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 86 50 'after' => '</div>', 87 51 'link_before' => '<span>', 88 'link_after' => '</span>' 52 'link_after' => '</span>', 89 53 ) ); 90 54 ?> 91 55 </div><!-- .entry-content --> 92 56 93 57 <footer class="entry-meta"> 94 <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?> 95 <?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() ); ?> 96 <?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?> 97 <?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() ); ?> 98 <?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?> 99 <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' ); ?> 100 <?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?> 101 <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); ?> 102 <?php endif; ?> 58 <?php 59 if ( comments_open() && pings_open() ) : // Comments and trackbacks open 60 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() ); 61 elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open 62 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() ); 63 elseif ( comments_open() && ! pings_open() ) : // Only comments open 64 _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyfourteen' ); 65 elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed 66 _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); 67 endif; 68 ?> 103 69 </footer><!-- .entry-meta --> 104 </article><!-- #post- <?php the_ID(); ?>-->70 </article><!-- #post-## --> 105 71 106 72 <nav id="image-navigation" class="site-navigation"> 107 73 <?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?> … … 112 78 113 79 <?php endwhile; // end of the loop. ?> 114 80 115 </div><!-- #content .site-content-->116 </ div><!-- #primary .content-area .image-attachment-->81 </div><!-- #content --> 82 </section><!-- #primary --> 117 83 118 <?php get_sidebar(); ?> 119 120 <?php get_footer(); ?> 121 No newline at end of file 84 <?php 85 get_sidebar(); 86 get_footer(); -
wp-content/themes/twentyfourteen/style.css
434 434 vertical-align: top; /* Improves readability and alignment in all browsers */ 435 435 width: 100%; 436 436 } 437 #searchform input[type="text"]{437 .search-field { 438 438 width: 100%; 439 439 } 440 440 … … 487 487 margin: 0 auto; 488 488 } 489 489 490 /* Text meant only for screen readers */ 491 .assistive-text { 492 clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 490 /* Assistive text */ 491 .screen-reader-text { 493 492 clip: rect(1px, 1px, 1px, 1px); 494 493 position: absolute !important; 495 494 } 496 495 496 .screen-reader-text:focus { 497 background-color: #f1f1f1; 498 border-radius: 3px; 499 box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 500 clip: auto !important; 501 color: #21759b; 502 display: block; 503 font-size: 14px; 504 font-weight: bold; 505 height: auto; 506 line-height: normal; 507 padding: 15px 23px 14px; 508 position: absolute; 509 left: 5px; 510 top: 5px; 511 text-decoration: none; 512 width: auto; 513 z-index: 100000; /* Above WP toolbar */ 514 } 515 497 516 /* Hidden */ 498 517 .hide { 499 518 display: none; 500 519 } 501 520 502 /* Clearing floats */ 503 .clearfix:after { 504 clear: both; 505 } 506 .clearfix:before, 507 .clearfix:after { 521 /* Clearing */ 522 .clear:before, 523 .clear:after, 524 [class*="content"]:before, 525 [class*="content"]:after, 526 [class*="site"]:before, 527 [class*="site"]:after { 528 content: ''; 508 529 display: table; 509 content: ""; 530 } 531 532 .clear:after, 533 [class*="content"]:after, 534 [class*="site"]:after { 535 clear: both; 510 536 } 511 537 512 538 … … 771 797 .search-box { 772 798 background-color: #35921f; 773 799 } 774 .search-box #searchform input[type="text"]{800 .search-box .search-field { 775 801 background-color: #fff; 776 802 float: right; 777 803 font-size: 13px; … … 1032 1058 content: '\0020\007c\0020'; 1033 1059 } 1034 1060 .entry-content, 1061 .page-content, 1035 1062 .entry-summary { 1036 1063 position: relative; 1037 1064 z-index: 2; 1038 1065 } 1039 .entry-content a { 1066 .entry-content a, 1067 .page-content a, { 1040 1068 text-decoration: underline; 1041 1069 } 1042 1070 .entry-content table, … … 1075 1103 } 1076 1104 1077 1105 /* #primary specific styles */ 1078 #primary .entry-header { 1106 #primary .entry-header, 1107 #primary .page-header { 1079 1108 background-color: #fff; 1080 1109 padding: 24px 10px 12px; 1081 1110 padding: 2.4rem 1.0rem 1.2rem; 1082 1111 } 1083 #primary .entry-title { 1112 #primary .entry-title, 1113 #primary .page-title { 1084 1114 font-size: 33px; 1085 1115 font-size: 3.3rem; 1086 1116 font-weight: 300; … … 1096 1126 text-transform: uppercase; 1097 1127 } 1098 1128 #primary .entry-content, 1129 #primary .page-content, 1099 1130 #primary .entry-summary { 1100 1131 background-color: #fff; 1101 1132 padding: 12px 10px 0; … … 1165 1196 1166 1197 /* Page specific styles */ 1167 1198 .page #primary .entry-header, 1168 .error404 #primary . entry-header,1199 .error404 #primary .page-header, 1169 1200 .single-attachment #primary .entry-header, 1170 1201 .page #primary .entry-content, 1171 .error404 #primary . entry-content,1202 .error404 #primary .page-content, 1172 1203 .single-attachment #primary .entry-content { 1173 1204 padding-top: 0; 1174 1205 } … … 1275 1306 } 1276 1307 /* For Firefox to avoid jagged edge */ 1277 1308 @-moz-document url-prefix() { 1278 1279 1309 .tag-links a:before { 1310 border-right: 10px solid #8c8c8c; 1280 1311 left: -10px; 1281 1312 left: -1.0rem; 1282 1313 } 1283 1314 } 1284 1315 .tag-links a:hover:before { 1285 1316 border-right-color: #2b2b2b; … … 1552 1583 /* =404 Page 1553 1584 ----------------------------------------------- */ 1554 1585 1555 .error404 . entry-content #searchform {1586 .error404 .page-content .search-form { 1556 1587 margin-bottom: 36px; 1557 1588 margin-bottom: 3.6rem; 1558 1589 } 1559 .error404 . entry-content .widget-title,1560 .error404 . entry-content .widgettitle {1590 .error404 .page-content .widget-title, 1591 .error404 .page-content .widgettitle { 1561 1592 border-top: 5px solid #000; 1562 1593 color: #2b2b2b; 1563 1594 padding-top: 7px; … … 1568 1599 /* =Media 1569 1600 ----------------------------------------------- */ 1570 1601 1602 img { 1603 max-width: 100%; 1604 height: auto; 1605 } 1571 1606 #site-header img, 1572 1607 .attachment-featured-thumbnail-large, 1573 1608 .entry-content img, 1574 1609 .comment-content img, 1575 1610 .widget img { 1576 max-width: 100%;1577 1611 vertical-align: middle; 1578 1612 } 1579 #site-header img,1580 .entry-content img,1581 .attachment-featured-thumbnail-large,1582 img[class*="align"],1583 img[class*="wp-image-"],1584 .widget img {1585 height: auto;1586 }1587 #site-header img,1588 .entry-content img,1589 img.size-full,1590 img.size-large,1591 img.wp-post-image {1592 max-width: 100%;1593 height: auto;1594 }1595 1613 .attachment-featured-featured img, 1596 1614 .attachment-featured-thumbnail img { 1597 1615 height: auto; … … 1615 1633 margin-bottom: 7px; 1616 1634 margin-bottom: 0.7rem; 1617 1635 } 1618 .entry-content img.wp-smiley, 1619 .comment-content img.wp-smiley { 1636 .wp-smiley { 1620 1637 border: none; 1621 1638 margin-bottom: 0; 1622 1639 margin-top: 0; … … 1851 1868 padding: 0 10px; 1852 1869 padding: 0 1.0rem; 1853 1870 } 1854 .comment list {1871 .comment-list { 1855 1872 list-style: none; 1856 1873 margin: 0 0 48px 0; 1857 1874 margin: 0 0 4.8rem 0; … … 1870 1887 color: #2b2b2b; 1871 1888 } 1872 1889 .comment-meta a, 1873 .comment list li.trackback a,1874 .comment list li.pingback a {1890 .comment-list li.trackback a, 1891 .comment-list li.pingback a { 1875 1892 color: #8c8c8c; 1876 1893 } 1877 1894 .comment-author a:hover, 1878 1895 .comment-meta a:hover, 1879 .comment list li.trackback a:hover,1880 .comment list li.pingback a:hover {1896 .comment-list li.trackback a:hover, 1897 .comment-list li.pingback a:hover { 1881 1898 color: #41a62a; 1882 1899 text-decoration: none; 1883 1900 } … … 1887 1904 content: '\007c\0020'; 1888 1905 } 1889 1906 .comments-area article, 1890 .comment list li.trackback,1891 .comment list li.pingback {1907 .comment-list li.trackback, 1908 .comment-list li.pingback { 1892 1909 border-top: 1px solid rgba(0, 0, 0, 0.1); 1893 1910 margin-bottom: 24px; 1894 1911 margin-bottom: 2.4rem; 1895 1912 padding: 24px 10px 0; 1896 1913 padding: 2.4rem 1.0rem 0; 1897 1914 } 1898 .comment list li:first-child article {1915 .comment-list li:first-child article { 1899 1916 border: none; 1900 1917 } 1901 1918 .comments-area article { … … 1958 1975 .comment-content ol ul { 1959 1976 margin-bottom: 0; 1960 1977 } 1961 .comment list .children {1978 .comment-list .children { 1962 1979 list-style: none; 1963 1980 margin-left: 20px; 1964 1981 margin-left: 2.0rem; … … 2315 2332 } 2316 2333 2317 2334 /* Search widget */ 2318 #searchsubmit {2335 .search-submit { 2319 2336 display: none; 2320 2337 } 2321 2338 … … 2486 2503 } 2487 2504 2488 2505 2489 /* =Jetpack2490 ----------------------------------------------- */2491 2492 /* Infinite Scroll */2493 2494 /* Hide elements when IS is in use */2495 .infinite-scroll #nav-below,2496 .infinite-scroll.neverending #colophon {2497 display: none;2498 }2499 .infinite-scroll #content {2500 margin-bottom: 48px;2501 margin-bottom: 4.8rem;2502 }2503 #infinite-handle {2504 margin-top: 48px;2505 margin-top: 4.8rem;2506 text-align: center;2507 }2508 #infinite-handle span {2509 background-color: #000;2510 border: 0;2511 border-radius: 2px;2512 color: #fff;2513 font-weight: 700;2514 font-size: 12px;2515 font-size: 1.2rem;2516 line-height: 1;2517 padding: 11px 35px 10px;2518 padding: 1.1rem 3.5rem 1.0rem;2519 text-transform: uppercase;2520 }2521 #infinite-handle span:before {2522 color: #fff;2523 }2524 #infinite-handle span:hover {2525 background-color: #41a62a;2526 }2527 .infinite-loader {2528 margin: 48px auto;2529 margin: 4.8rem auto;2530 width: 25px;2531 width: 2.5rem;2532 height: 24px;2533 height: 2.4rem;2534 }2535 #infinite-footer {2536 z-index: 10;2537 }2538 #infinite-footer .container {2539 border-width: 1px 1px 0 0;2540 margin: 0;2541 }2542 /* Reset when IS is finished */2543 .infinite-scroll.infinity-end #content {2544 margin-bottom: 0;2545 }2546 .infinite-end.neverending #colophon {2547 display: block;2548 }2549 2550 2551 /* Sharing */2552 #main div.sharedaddy div.sd-block {2553 border-top: 1px dotted rgba(0, 0, 0, 0.1);2554 }2555 #main div.sharedaddy h3.sd-title {2556 font-size: 11px;2557 font-size: 1.1rem;2558 font-family: lato, sans-serif;2559 text-transform: uppercase;2560 }2561 #main div.sharedaddy .sd-like h3.sd-title {2562 width: 17.875%;2563 }2564 .entry-content > .pd-rating .rating-msg {2565 font-size: 12px;2566 font-size: 1.2rem;2567 }2568 2569 /* Stats image */2570 img#wpstats {2571 margin-top: -5px;2572 margin-top: -0.5rem;2573 position: absolute2574 }2575 2576 /* Subscription */2577 .jetpack_subscription_widget input[type="text"] {2578 padding: 4px !important;2579 width: 100% !important;2580 }2581 .comment-subscription-form {2582 margin-bottom: 0;2583 }2584 2585 2586 /* =WP.com2587 ----------------------------------------------- */2588 2589 /* Prevent stats images to break the layout */2590 img[src^="http://botd"] {2591 position: absolute;2592 }2593 2594 /* Corrects line number misalignemnt in GitHub Gist embeds */2595 .gist .gist-file .gist-data .line-numbers span {2596 line-height: 1.7142857142;2597 }2598 .entry-content .gist table {2599 margin-bottom: 0;2600 }2601 2602 2603 2506 /* =Media Queries 2604 2507 ----------------------------------------------- */ 2605 2508 … … 2853 2756 padding: 0 4.46428571%; 2854 2757 } 2855 2758 .page #primary .entry-header, 2856 .error404 #primary . entry-header {2759 .error404 #primary .page-header { 2857 2760 margin: 0 4.59183673%; 2858 2761 padding: 0 4.46428571% 12px; 2859 2762 padding: 0 4.46428571% 1.2rem; … … 2887 2790 margin-top: 0; 2888 2791 } 2889 2792 .comments-area article, 2890 .comment list li.trackback,2891 .comment list li.pingback {2793 .comment-list li.trackback, 2794 .comment-list li.pingback { 2892 2795 margin-bottom: 36px; 2893 2796 margin-bottom: 3.6rem; 2894 2797 padding-top: 36px; … … 2914 2817 .nocomments, 2915 2818 #comments #respond, 2916 2819 .comments-area article, 2917 .comment list li.trackback,2918 .comment list li.pingback,2820 .comment-list li.trackback, 2821 .comment-list li.pingback, 2919 2822 .post-navigation .nav-previous, 2920 2823 .post-navigation .nav-next { 2921 2824 padding-right: 9.12778904%; … … 2934 2837 .full-width .comments-title, 2935 2838 .full-width #comments #respond, 2936 2839 .full-width .comments-area article, 2937 .full-width .comment list li.trackback,2938 .full-width .comment list li.pingback {2840 .full-width .comment-list li.trackback, 2841 .full-width .comment-list li.pingback { 2939 2842 padding-right: 6.04307432%; 2940 2843 padding-left: 6.04307432%; 2941 2844 } … … 2988 2891 margin: 1.2rem 8.03571428% 2.4rem 12.5%; 2989 2892 } 2990 2893 .page #primary .entry-header, 2991 .error404 #primary . entry-header {2894 .error404 #primary .page-header { 2992 2895 margin: 0 8.03571428% 0 12.5%; 2993 2896 } 2994 2897 #primary .full-width .entry-header, … … 3017 2920 .nocomments, 3018 2921 #comments #respond, 3019 2922 .comments-area article, 3020 .comment list li.trackback,3021 .comment list li.pingback,2923 .comment-list li.trackback, 2924 .comment-list li.pingback, 3022 2925 .post-navigation .nav-previous, 3023 2926 .post-navigation .nav-next { 3024 2927 padding-right: 12.39493534%; … … 3027 2930 #comments #respond { 3028 2931 padding-right: 13.8900862%; 3029 2932 } 3030 .comment list,3031 .full-width .comment list {2933 .comment-list, 2934 .full-width .comment-list { 3032 2935 margin-left: -70px; 3033 2936 margin-left: -7.0rem; 3034 2937 } … … 3041 2944 .full-width .comments-title, 3042 2945 .full-width #comments #respond, 3043 2946 .full-width .comments-area article, 3044 .full-width .comment list li.trackback,3045 .full-width .comment list li.pingback {2947 .full-width .comment-list li.trackback, 2948 .full-width .comment-list li.pingback { 3046 2949 padding-right: 11.30926724%; 3047 2950 padding-left: 11.30926724%; 3048 2951 } … … 3067 2970 #page:before { 3068 2971 background-color: #000; 3069 2972 content: ''; 2973 display: block; 3070 2974 height: 100%; 3071 2975 min-height: 100%; 3072 2976 position: absolute; … … 3120 3024 margin: 0 0 0 -27.31707317%; 3121 3025 width: 24.87804878%; 3122 3026 } 3123 #primary .entry-header { 3027 #primary .entry-header, 3028 #primary .page-header { 3124 3029 margin: -48px 4.59183673% 0; 3125 3030 margin: -4.8rem 4.59183673% 0; 3126 3031 padding: 24px 4.46428571% 12px; 3127 3032 padding: 2.4rem 4.46428571% 1.2rem; 3128 3033 } 3129 3034 #primary .entry-content, 3035 #primary .page-content, 3130 3036 #primary .entry-summary { 3131 3037 margin: 0 4.59183673%; 3132 3038 padding: 12px 4.46428571% 0; … … 3186 3092 display: block; 3187 3093 } 3188 3094 .page #primary .entry-header, 3189 .error404 #primary . entry-header {3095 .error404 #primary .page-header { 3190 3096 margin: 0 4.59183673%; 3191 3097 padding: 0 4.46428571% 12px; 3192 3098 padding: 0 4.46428571% 1.2rem; … … 3201 3107 } 3202 3108 #primary .full-width .entry-header, 3203 3109 #primary .full-width .entry-content, 3110 #primary .full-width .page-content, 3204 3111 #primary .full-width footer.entry-meta { 3205 3112 margin: 0 5.882236%; 3206 3113 } … … 3208 3115 .nocomments, 3209 3116 #comments #respond, 3210 3117 .comments-area article, 3211 .comment list li.trackback,3212 .comment list li.pingback,3118 .comment-list li.trackback, 3119 .comment-list li.pingback, 3213 3120 .post-navigation .nav-previous, 3214 3121 .post-navigation .nav-next { 3215 3122 padding-right: 9.87001616%; 3216 3123 padding-left: 9.19765166%; 3217 3124 } 3218 .comment list,3219 .full-width .comment list {3125 .comment-list, 3126 .full-width .comment-list { 3220 3127 margin-left: 0; 3221 3128 } 3222 3129 .comment-navigation { … … 3228 3135 .full-width .comments-title, 3229 3136 .full-width #comments #respond, 3230 3137 .full-width .comments-area article, 3231 .full-width .comment list li.trackback,3232 .full-width .comment list li.pingback {3138 .full-width .comment-list li.trackback, 3139 .full-width .comment-list li.pingback { 3233 3140 padding-right: 5.882236%; 3234 3141 padding-left: 5.882236%; 3235 3142 } … … 3283 3190 } 3284 3191 3285 3192 @media screen and (min-width: 1150px) { 3286 #primary .entry-header { 3193 #primary .entry-header, 3194 #primary .page-header { 3287 3195 margin: -48px 8.03571428% 0 12.5%; 3288 3196 margin: -4.8rem 8.03571428% 0 12.5%; 3289 3197 } 3290 3198 #primary .entry-content, 3199 #primary .page-content, 3291 3200 #primary .entry-summary { 3292 3201 margin: 0 8.03571428% 0 12.5%; 3293 3202 } … … 3299 3208 .nocomments, 3300 3209 #comments #respond, 3301 3210 .comments-area article, 3302 .comment list li.trackback,3303 .comment list li.pingback,3211 .comment-list li.trackback, 3212 .comment-list li.pingback, 3304 3213 .post-navigation .nav-previous, 3305 3214 .post-navigation .nav-next { 3306 3215 padding-right: 12.44146986%; … … 3309 3218 #comments #respond { 3310 3219 padding-right: 13.73697916%; 3311 3220 } 3312 .comment list,3313 .full-width .comment list {3221 .comment-list, 3222 .full-width .comment-list { 3314 3223 margin-left: -70px; 3315 3224 margin-left: -7.0rem; 3316 3225 } … … 3322 3231 margin: 0 8.03571428% 2.4rem 12.5%; 3323 3232 } 3324 3233 .page #primary .entry-header, 3325 .error404 #primary . entry-header {3234 .error404 #primary .page-header { 3326 3235 margin: 0 8.03571428% 0 12.5%; 3327 3236 } 3328 3237 #primary .full-width .entry-header, 3329 3238 #primary .full-width .entry-content, 3239 #primary .full-width .page-content, 3330 3240 #primary .full-width footer.entry-meta { 3331 3241 margin: 0 11.21868265%; 3332 3242 } … … 3336 3246 .full-width .comments-title, 3337 3247 .full-width #comments #respond, 3338 3248 .full-width .comments-area article, 3339 .full-width .comment list li.trackback,3340 .full-width .comment list li.pingback {3249 .full-width .comment-list li.trackback, 3250 .full-width .comment-list li.pingback { 3341 3251 padding-right: 11.21868265%; 3342 3252 padding-left: 11.21868265%; 3343 3253 } … … 3366 3276 } 3367 3277 #primary .full-width .entry-header, 3368 3278 #primary .full-width .entry-content, 3279 #primary .full-width .page-content, 3369 3280 #primary .full-width footer.entry-meta { 3370 3281 margin: 0 0 0 11.21868265%; 3371 3282 } … … 3375 3286 .full-width .comments-title, 3376 3287 .full-width #comments #respond, 3377 3288 .full-width .comments-area article, 3378 .full-width .comment list li.trackback,3379 .full-width .comment list li.pingback {3289 .full-width .comment-list li.trackback, 3290 .full-width .comment-list li.pingback { 3380 3291 padding-right: 0; 3381 3292 } 3382 3293 } 3294 No newline at end of file -
wp-content/themes/twentyfourteen/full-width-page.php
8 8 9 9 get_header(); ?> 10 10 11 <?php if ( is_front_page() ) : ?>12 13 <div class="front-page-content-wrapper">14 <div class="front-page-content-main">15 16 <?php if ( twentyfourteen_has_featured_posts() ) : ?>17 <?php get_template_part( 'featured-content' ); ?>18 <?php endif; ?>19 20 <div class="front-page-content-area clearfix">21 22 <div id="primary" class="content-area no-sidebar">23 <div id="content" class="site-content full-width" role="main">24 <?php25 if ( have_posts() ) :26 while ( have_posts() ) :27 the_post();28 get_template_part( 'content', 'page' );29 comments_template( '', true );30 endwhile;31 32 twentyfourteen_content_nav( 'nav-below' );33 else :34 get_template_part( 'no-results', 'index' );35 endif;36 ?>37 </div><!-- #content .site-content -->38 </div><!-- #primary .content-area -->39 40 </div><!-- .front-page-content-area -->41 42 </div><!-- .front-page-content-main -->43 </div><!-- .front-page-content-wrapper -->44 45 <?php else : ?>46 47 11 <div id="primary" class="content-area"> 48 12 <div id="content" class="site-content full-width" role="main"> 49 50 <?php while ( have_posts() ) : the_post(); ?> 51 52 <?php get_template_part( 'content', 'page' ); ?> 13 <?php 14 while ( have_posts() ) : 15 the_post(); 53 16 54 <?php comments_template( '', true ); ?>17 get_template_part( 'content', 'page' ); 55 18 56 <?php endwhile; ?> 19 // If comments are open or we have at least one comment, load up the comment template. 20 if ( comments_open() || get_comments_number() ) 21 comments_template(); 22 endwhile; 23 ?> 24 </div><!-- #content --> 25 </div><!-- #primary --> 57 26 58 </div><!-- #content .site-content --> 59 </div><!-- #primary .content-area --> 60 61 <?php endif; // is_front_page() check ?> 62 63 <?php get_sidebar(); ?> 64 65 <?php get_footer(); ?> 27 <?php 28 get_sidebar(); 29 get_footer(); -
wp-content/themes/twentyfourteen/content-page.php
1 1 <?php 2 2 /** 3 * The template used for displaying page content in page.php3 * The template used for displaying page content. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Twenty_Fourteen … … 8 8 ?> 9 9 10 10 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 <header class="entry-header"> 12 <h1 class="entry-title"><?php the_title(); ?></h1> 13 </header><!-- .entry-header --> 11 <?php the_title( '<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->' ); ?> 14 12 15 <div class="entry-content clearfix"> 16 <?php the_content(); ?> 13 <div class="entry-content"> 17 14 <?php 15 the_content(); 18 16 wp_link_pages( array( 19 17 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 20 18 'after' => '</div>', 21 19 'link_before' => '<span>', 22 'link_after' => '</span>' 20 'link_after' => '</span>', 23 21 ) ); 22 23 edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); 24 24 ?> 25 <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>26 25 </div><!-- .entry-content --> 27 </article><!-- #post- <?php the_ID(); ?>-->26 </article><!-- #post-## -->