function flegondavid_has_featured_posts($minimum = 1) { if (is_paged()) { return false; } $minimum = absint($minimum); $featured_posts = flegondavid_get_featured_posts(); if (!is_array($featured_posts) || $minimum > count($featured_posts)) { return false; } return true; }
<?php $featured_posts = flegondavid_get_featured_posts(); ?> <div id="middle-wrapper"> <div id="content-wrapper" class="container"> <?php scroll_point('row-fluid'); ?> <div id="content-header" class="row-fluid"> <main id="content-main" class="page-<?php the_ID(); ?> group span4" role="main"> <input type="hidden" value="<?php the_ID(); ?> " name="content-id" id="content-id" /> <input type="hidden" value="page" name="post-type" id="post-type" /> <article id="content" class="editable clearfix"> <h1><?php the_title(); ?> </h1> <?php the_content(); ?> </article> </main><!-- / #content-main --> <?php if (flegondavid_has_featured_posts(1)) {