mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
7d35419e62
A magazine theme with clean, responsive design focused on highlighting featured content prominently on home page. This is slated for 3.8. Development will occur in trunk for the theme, and in plugins for the nice-to-have features. Nice-to-have improvements include: - Add a Contributors page template to highlight authors. - Easy-to-manage featured content. - Add support for an Authors widget to highlight authors. Welcome, Twenty Fourteen né Further. Props iamtakashi, see #24858. git-svn-id: http://core.svn.wordpress.org/trunk@24832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
45 lines
1.7 KiB
PHP
45 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* @package WordPress
|
|
* @subpackage Twenty_Fourteen
|
|
*/
|
|
?>
|
|
|
|
<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">
|
|
<?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() ) :
|
|
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
|
|
endif;
|
|
?>
|
|
</a>
|
|
|
|
<div class="entry-wrap">
|
|
<header class="entry-header">
|
|
<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 ?>
|
|
</div><!-- .entry-meta -->
|
|
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
|
|
</header><!-- .entry-header -->
|
|
|
|
<div class="entry-summary clearfix">
|
|
<?php the_excerpt(); ?>
|
|
</div><!-- .entry-summary -->
|
|
</div>
|
|
|
|
</article><!-- #post-<?php the_ID(); ?> -->
|