public static function getPage($page = 1, $args = array(), $load_terms = true)
    {
        $instance = Post\Factory::create(get_called_class());

        $criteria = array(
            'post_type' => $instance->getPostType(),
            'orderby' => 'date',
            'order' => 'DESC',
            'posts_per_page' => $instance->getPostsPerPage(),
            'offset' => ($page - 1) * $instance->getPostsPerPage()
        );
        $criteria = array_merge($criteria, $args);
        return Post\Factory::createMultiple(get_posts($criteria), $load_terms);
    }
public static function getPage($page = 1, $args = array(), $load_terms = true)
    {
        $instance = Post\Factory::create(get_called_class());

        $criteria = array(
            'post_type' => $instance->getPostType(),
            'orderby' => 'date',
            'order' => 'DESC',
            'posts_per_page' => $instance->getPostsPerPage(),
            'offset' => ($page - 1) * $instance->getPostsPerPage()
        );
        $criteria = array_merge($criteria, $args);
        return Post\Factory::createMultiple(get_posts($criteria), $load_terms);
    }
public static function getPage ( $ page = 1 , $ args = array ( ) , $ load_terms = true ) { $ instance = Post \ Factory :: create ( get_called_class ( ) ) ; $ criteria = array ( 'post_type' => $ instance -> getPostType ( ) , 'orderby' => 'date' , 'order' => 'DESC' , 'posts_per_page' => $ instance -> getPostsPerPage ( ) , 'offset' => ( $ page - 1 ) * $ instance -> getPostsPerPage ( ) ) ; $ criteria = array_merge ( $ criteria , $ args ) ; return Post \ Factory :: createMultiple ( get_posts ( $ criteria ) , $ load_terms ) ; }
Get results by page
@param int $page
@param array $args
@param string $sort
@param bool $load_terms
Get results by page