/** * A helper conditional function that returns a boolean value. * * @since Ridizain 1.0 * * @return bool Whether there are featured posts. */ function ridizain_has_featured_posts() { return !is_paged() && (bool) ridizain_get_featured_posts(); }
* * @package Ridizain * @since Ridizain 1.0 */ ?> <div id="featured-content" class="featured-content"> <div class="featured-content-inner"> <?php /** * Fires before the Ridizain featured content. * * @since Ridizain 1.0 */ do_action('ridizain_featured_posts_before'); $ridizain_featured_posts = ridizain_get_featured_posts(); foreach ((array) $ridizain_featured_posts as $order => $post) { setup_postdata($post); // Include the featured content template. get_template_part('content', 'featured-post'); } /** * Fires after the Ridizain featured content. * * @since Ridizain 1.0 */ do_action('ridizain_featured_posts_after'); wp_reset_postdata(); ?> </div><!-- .featured-content-inner --> </div><!-- #featured-content .featured-content -->