Beispiel #1
1
<?php

get_header();
?>

<div id="posts" class="tiles">
<?php 
Front_Page_Posts::object();
// Initialize Front Page Posts query
if (!dynamic_sidebar('Home Tiles')) {
    $Query = Front_Page_Posts::WP_Query();
    while ($Query->have_posts()) {
        $Query->the_post();
        get_template_part('loop');
    }
}
?>
</div>

<div class="pagination">
<a href="<?php 
echo get_permalink(get_option('page_for_posts'));
?>
" class="page-numbers next-button"><?php 
_e('More Blog Posts');
?>
</a>
</div>

<?php 
get_footer();
 public static function &object()
 {
     if (!self::$object instanceof self) {
         self::$object = new self();
     }
     if (empty(self::$wp_query)) {
         self::$wp_query = new WP_Query(array('post_type' => 'post'));
     }
     return self::$object;
 }
Beispiel #3
-1
 public function load(array $options = array())
 {
     return Front_Page_Posts::WP_Query();
 }