Exemplo n.º 1
0
/**
 * Returns the various posts for the homepage two and three panel layouts
 */
function largo_home_get_single_featured_and_series()
{
    $big_story = largo_home_single_top();
    $featured_stories = largo_home_featured_stories();
    $series_stories = largo_home_series_stories();
    $series_stories_term = largo_home_series_stories_term();
    if (empty($big_story)) {
        // Something bad has happened!
        return array();
    }
    return array('big_story' => $big_story, 'series_stories' => $series_stories, 'featured_stories' => $featured_stories, 'series_stories_term' => $series_stories_term);
}
Exemplo n.º 2
0
function homepage_feature_stories_list()
{
    global $shown_ids;
    $max = 3;
    /**
     * Filter the maximum number of posts to show in the featured stories list
     * on the HomepageSingleWithFeatured homepage template.
     *
     * This is used in the query for the series list of posts in the same series
     * as the main feature. This is the maximum number of posts that will display
     * in the list.
     * 
     * Default value is 3.
     *
     * @since 0.5.1
     *
     * @param int  $var minimum number of posts that can show.
     */
    $max = apply_filters('largo_homepage_feature_stories_list_maximum', $max);
    ob_start();
    $featured_stories = largo_home_featured_stories($max);
    foreach ($featured_stories as $featured) {
        $shown_ids[] = $featured->ID;
        ?>
		<article class="featured-story">
			<h5 class="top-tag"><?php 
        largo_top_term('post=' . $featured->ID);
        ?>
</h5>
			<h4 class="related-story"><a href="<?php 
        echo esc_url(get_permalink($featured->ID));
        ?>
">
				<?php 
        echo $featured->post_title;
        ?>
</a></h4>
		</article>
<?php 
    }
    $ret = ob_get_contents();
    ob_end_clean();
    return $ret;
}