예제 #1
0
    ?>
 		<h5 class="byline"><?php 
    largo_byline();
    ?>
</h5>
 		<?php 
}
?>
	</header><!-- / entry header -->

	<div class="entry-content">
 		<?php 
if (isset($opt['show']['image']) && $opt['show']['image']) {
    ?>
			<div class="has-thumbnail <?php 
    largo_hero_class(get_the_ID());
    ?>
">
				<a href="<?php 
    the_permalink();
    ?>
">
					<?php 
    the_post_thumbnail();
    ?>
				</a>
			</div>
		<?php 
}
?>
<article id="post-<?php 
echo $featured_post->ID;
?>
" <?php 
post_class('span3');
?>
>
	<?php 
if (has_post_thumbnail($featured_post->ID)) {
    ?>
		<div class="<?php 
    largo_hero_class($featured_post->ID);
    ?>
">
			<a href="<?php 
    echo post_permalink($featured_post->ID);
    ?>
">
				<?php 
    echo get_the_post_thumbnail($featured_post->ID, 'rect_thumb');
    ?>
			</a>
		</div>
	<?php 
}
?>

	<h2 class="entry-title">
		<a href="<?php 
echo post_permalink($featured_post->ID);
?>
예제 #3
0
<?php

/*
 * The default template for displaying content
 *
 * @package Largo
 */
$tags = of_get_option('tag_display');
$hero_class = largo_hero_class($post->ID, FALSE);
$values = get_post_custom($post->ID);
$featured = has_term('homepage-featured', 'prominence');
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class('clearfix');
?>
>

	<?php 
// Special treatment for posts that are in the Homepage Featured prominence taxonomy term and have thumbnails or videos.
if ($featured && (has_post_thumbnail() || $values['youtube_url'])) {
    ?>
		<header>
			<div class="hero span12 <?php 
    echo $hero_class;
    ?>
">
			<?php 
    if ($youtube_url = $values['youtube_url'][0]) {
예제 #4
0
/**
 * Returns DOM for a featured gallery hero.
 *
 * @since 0.5.1
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
 * @param String $classes Optional. Class string to apply to outer div.hero
 */
function largo_get_featured_gallery_hero($post = null, $classes = '')
{
    $post = get_post($post);
    $featured_media = largo_get_featured_media($post->ID);
    if ($featured_media['type'] != 'gallery') {
        return;
    }
    $hero_class = largo_hero_class($post->ID, false);
    $classes = "hero {$hero_class} {$classes}";
    $context = array('classes' => $classes, 'gallery_ids' => implode(',', $featured_media['gallery']));
    ob_start();
    largo_render_template('partials/hero', 'featured-gallery', $context);
    $ret = ob_get_clean();
    return $ret;
}