Пример #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);
}
Пример #2
0
<?php

global $shown_ids;
$bigStoryPost = largo_home_single_top();
$shown_ids[] = $bigStoryPost->ID;
//don't repeat the current post
?>
<div id="homepage-featured" class="row-fluid clearfix">
	<div class="home-single span12">
		<?php 
echo $viewToggle;
// View toggle zone
?>
		<div class="home-top">

			<div <?php 
post_class('full-hero');
?>
>
				<a href="<?php 
echo esc_attr(get_permalink($bigStoryPost->ID));
?>
">
					<?php 
echo get_the_post_thumbnail($bigStoryPost->ID, 'full');
?>
				</a>
			</div>

			<div id="dark-top" class="overlay">
				<div class="span10">
Пример #3
0
/**
 * Returns a short list (3 posts) of stories in the same series as the main feature
 **/
function homepage_series_stories_list()
{
    global $shown_ids;
    $feature = largo_get_the_main_feature(largo_home_single_top());
    $min = 2;
    $max = 3;
    /**
     * Filter the minimum number of posts to show in a series list in the
     * HomepageSingleWithSeriesStories homepage list.
     *
     * This is used in the query for the series list of posts in the same series
     * as the main feature. If fewer than this number of posts exist, the list
     * is hidden and the headline dominates the full box.
     * 
     * Default value is 2.
     *
     * @since 0.5.1
     *
     * @param int  $var minimum number of posts that can show.
     */
    $min = apply_filters('largo_homepage_series_stories_list_minimum', $min);
    /**
     * Filter the maximum number of posts to show in a series list in the
     * HomepageSingleWithSeriesStories homepage list.
     *
     * 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_series_stories_list_maximum', $max);
    $series_posts = largo_get_recent_posts_for_term($feature, $max, $min);
    ob_start();
    if (!empty($feature)) {
        ?>
	<h5 class="top-tag"><a class="post-category-link" href="<?php 
        echo get_term_link($feature);
        ?>
">
		<?php 
        echo __("More in", "largo") . " " . esc_html($feature->name);
        ?>
</a></h5>
			<?php 
        foreach ($series_posts as $series_post) {
            $shown_ids[] = $series_post->ID;
            ?>
				<h4 class="related-story"><a href="<?php 
            echo esc_url(get_permalink($series_post->ID));
            ?>
">
					<?php 
            echo get_the_title($series_post->ID);
            ?>
</a></h4>
			<?php 
        }
        ?>
			<p class="more"><a href="<?php 
        echo get_term_link($feature);
        ?>
">
				<?php 
        _e('Complete Coverage', 'largo');
        ?>
</a></p>
<?php 
    }
    wp_reset_postdata();
    $ret = ob_get_contents();
    ob_end_clean();
    return $ret;
}