Esempio n. 1
0
/**
 * A helper conditional function that returns a boolean value.
 *
 * @since Everal 1.0
 *
 * @return bool Whether there are featured posts.
 */
function everal_has_featured_posts()
{
    return !is_paged() && (bool) everal_get_featured_posts();
}
Esempio n. 2
0
 * @subpackage Everal
 * @since Everal 1.0
 */
?>

<div class="featured-slider">
	<div id="featured-content" class="featured-content swiper-container">
		<div class="featured-content-inner swiper-wrapper">
		<?php 
/**
 * Fires before the Everal 1.0 featured content.
 *
 * @since Everal 1.0
 */
do_action('everal_featured_posts_before');
$featured_posts = everal_get_featured_posts();
foreach ((array) $featured_posts as $order => $post) {
    setup_postdata($post);
    // Include the featured content template.
    get_template_part('content', 'featured-post');
}
/**
 * Fires after the Everal 1.0 featured content.
 *
 * @since Everal 1.0
 */
do_action('everal_featured_posts_after');
wp_reset_postdata();
?>
		</div><!-- .featured-content-inner -->
	</div><!-- #featured-content .featured-content -->