Ejemplo n.º 1
0
function flb_featured_rss($content)
{
    global $post;
    if (has_post_thumbnail($post->ID)) {
        $content = '<p>' . flb_get_post_image($post->ID) . '</p>' . $content;
    }
    return $content;
}
Ejemplo n.º 2
0
the_title('<h2 class="post__title">', '</h2>');
?>
        </header>

        <?php 
if (is_front_page()) {
    ?>
            <?php 
    echo flb_get_post_image(null, 'post__thumbnail');
    ?>
        <?php 
} else {
    ?>
            <div class="post__preview">
                <div class="post__thumbnail__container">
                    <?php 
    echo flb_get_post_image(null, 'post__thumbnail', 'medium');
    ?>
                </div>
                <div class="post__content">
                    <?php 
    the_excerpt();
    ?>
                </div>
            </div>
        <?php 
}
?>
    </a>
</article>
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
    <header class="page__header container">
        <?php 
the_title('<h1 class="page__title">', '</h1>');
?>
    </header>

    <?php 
echo flb_get_post_image(null, 'post__thumbnail');
?>

    <div class="page__content container">
        <?php 
the_content();
?>
    </div>
</article>
    <?php 
}
?>
    <?php 
$prev = get_previous_post();
if ($prev) {
    ?>
        <a href="<?php 
    echo get_the_permalink($prev->ID);
    ?>
" rel="prev" class="post__navigation__link post__navigation__prev">
            <p>
                <span class="post__navigation__text">
                    <span class="visuallyhidden"><?php 
    _e('Previous post:', 'twentysixteen');
    ?>
</span>
                    <?php 
    echo get_the_title($prev->ID);
    ?>
                </span>
                <?php 
    echo flb_get_post_image($prev->ID, 'post__navigation__image', 'thumbnail');
    ?>
            </p>
        </a>
    <?php 
}
?>
</nav>