예제 #1
0
파일: jetpack.php 프로젝트: puneetkay/cover
/**
 * A helper conditional function that returns a boolean value.
 *
 * @return bool Whether there are featured posts.
 */
function cover_has_featured_posts()
{
    return !is_paged() && (bool) cover_get_featured_posts();
}
예제 #2
0
파일: cover-featured.php 프로젝트: 9x/cover
<?php

/**
 * Include for Jetpack featured content
 *
 * @package Cover
 */
?>

<div class="featured-container">

	<ul>

	<?php 
$img = '';
$featured_posts = cover_get_featured_posts();
foreach ((array) $featured_posts as $order => $post) {
    setup_postdata($post);
    if ('' != get_the_post_thumbnail()) {
        $img_arr = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
        $img = $img_arr[0];
    }
    ?>

	<li>
		<a href="<?php 
    the_permalink();
    ?>
" rel="bookmark">
			<div class="cover<?php 
    if ('' != $img) {