public function paginate($page, $perPage = null)
    {
        $this->queryDefaults['paged'] = $page;
        $this->queryDefaults['posts_per_page'] = $perPage ?: get_option('posts_per_page');

        return $this;
    }
public function paginate($page, $perPage = null)
    {
        $this->queryDefaults['paged'] = $page;
        $this->queryDefaults['posts_per_page'] = $perPage ?: get_option('posts_per_page');

        return $this;
    }
public function paginate ( $ page , $ perPage = null ) { $ this -> queryDefaults [ 'paged' ] = $ page ; $ this -> queryDefaults [ 'posts_per_page' ] = $ perPage ? : get_option ( 'posts_per_page' ) ; return $ this ; }
Paginate query results.

@param  int|string $page
@param  int|string $perPage

@return self
Paginate query results .