library/Helper/Query.php
public static function getPaginationData()
    {
        global $wp_query;

        $data = array();

        $data['postType'] = $wp_query->query['post_type'];
        $data['postCount'] = $wp_query->post_count;
        $data['postTotal'] = $wp_query->found_posts;
        $data['pageIndex'] = ($wp_query->query['paged']) ? intval($wp_query->query['paged']) : 1;
        $data['pageTotal'] = $wp_query->max_num_pages;

        return $data;
    }
public static function getPaginationData()
    {
        global $wp_query;

        $data = array();

        $data['postType'] = $wp_query->query['post_type'];
        $data['postCount'] = $wp_query->post_count;
        $data['postTotal'] = $wp_query->found_posts;
        $data['pageIndex'] = ($wp_query->query['paged']) ? intval($wp_query->query['paged']) : 1;
        $data['pageTotal'] = $wp_query->max_num_pages;

        return $data;
    }
public static function getPaginationData ( ) { global $ wp_query ; $ data = array ( ) ; $ data [ 'postType' ] = $ wp_query -> query [ 'post_type' ] ; $ data [ 'postCount' ] = $ wp_query -> post_count ; $ data [ 'postTotal' ] = $ wp_query -> found_posts ; $ data [ 'pageIndex' ] = ( $ wp_query -> query [ 'paged' ] ) ? intval ( $ wp_query -> query [ 'paged' ] ) : 1 ; $ data [ 'pageTotal' ] = $ wp_query -> max_num_pages ; return $ data ; }
Get pagination data from main query
@return array Pagination data
Get pagination data from main query