public function render()
 {
     // Open .hscol
     if (self::$counter === 1) {
         $this->column_open();
     }
     get_template_part('parts/box-' . get_post_type(), $this->column_size_name);
     // Close .hscol
     if (self::$counter === $this->column_size) {
         self::column_close();
     }
     // Set the static instance variable to false
     self::$first = false;
 }
예제 #2
0
/**
 * Pure Shortcode Modification
 *
 * @param $wp_query
 * @param $atts - Shortcode Attributes
 *
 * @return string      Return the content
 *
 * Note: Do not echo. Process and Return!
 * @internal param $ (array) $args Arguments passed from Shortcode
 *
 */
function acid_print_items($query, $atts)
{
    $out = "";
    ob_start();
    // Yeah. We'll capture a Template part like this.
    // Don't print shortcode entries as large-thumbnails
    // Kind of a hack: Set the village_page to be 2
    set_query_var('village_page', 2);
    while ($query->have_posts()) {
        $query->the_post();
        get_template_part('horizontal/loop-horizontal-entry');
    }
    Horizontal_Entry::clean_up();
    $out .= ob_get_contents();
    ob_end_clean();
    wp_reset_postdata();
    return $out;
}
<?php

// Prepare for Pagination
if ($village_page === 1 && Horizontal_Entry::is_first()) {
    $column_size = 1;
} else {
    $column_size = 2;
}
// Render a Horizontal Entry
$entry = new Horizontal_Entry($column_size);
$entry->render();
예제 #4
0
    }
    $village_query = $wp_query;
}
?>
<div id="scrollbar">
	<div id="primary" class="viewport" data-horizontal-scroll="on">
		<div id="content" class="overview" role="main">
			<?php 
while ($village_query->have_posts()) {
    // Setup the_post
    $village_query->the_post();
    get_template_part('horizontal/loop-horizontal-entry');
}
// endwhile
// Clean up
Horizontal_Entry::clean_up();
?>

			<?php 
village_pagination($village_query);
?>
		</div>
		<!-- #content -->

	</div>
	<!-- #primary -->

	<div class="scrollbar">
		<div class="track">
			<div class="thumb"></div>
		</div>