Exemple #1
0
/**
 * A helper conditional function that returns a boolean value.
 *
 * @since Kleo 1.0
 *
 * @return bool Whether there are featured posts.
 */
function kleo_has_featured_posts()
{
    return !is_paged() && (bool) kleo_get_featured_posts();
}
Exemple #2
0
		</div> ';
    $after_featured .= '</div>';
}
?>

<div id="featured-content" class="featured-content">
	
	<?php 
/**
 * Fires before the featured content.
 *
 * @since Kleo 1.0
 */
do_action('kleo_featured_posts_before');
echo $before_featured;
$featured_posts = kleo_get_featured_posts();
foreach ((array) $featured_posts as $order => $post) {
    setup_postdata($post);
    // Include the featured content template.
    if ('grid' == sq_option('featured_content_layout', 'carousel')) {
        get_template_part('page-parts/post-content-masonry');
    } else {
        get_template_part('page-parts/post-content-carousel');
    }
}
echo $after_featured;
/**
 * Fires after the Kleo featured content.
 *
 * @since Kleo 1.0
 */