mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-06 19:01:44 +01:00
66be5edfb5
Built from https://develop.svn.wordpress.org/trunk@25743 git-svn-id: http://core.svn.wordpress.org/trunk@25656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
52 lines
1.6 KiB
PHP
52 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* @package WordPress
|
|
* @subpackage Twenty_Fourteen
|
|
*/
|
|
?>
|
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
|
<a class="attachment-featured-featured" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
|
|
<?php
|
|
if ( has_post_thumbnail() ) :
|
|
the_post_thumbnail( 'featured-thumbnail-featured' );
|
|
|
|
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">
|
|
<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 the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?>
|
|
</header><!-- .entry-header -->
|
|
|
|
<div class="entry-summary">
|
|
<?php the_excerpt(); ?>
|
|
</div><!-- .entry-summary -->
|
|
</div>
|
|
</article><!-- #post-## -->
|