diff --git a/inc/views/pluggable/pagination.php b/inc/views/pluggable/pagination.php index 955ec3fa02..a0e95f9cf5 100644 --- a/inc/views/pluggable/pagination.php +++ b/inc/views/pluggable/pagination.php @@ -72,8 +72,12 @@ public function get_posts( \WP_REST_Request $request ) { unset( $args['pagename'] ); } - $args['posts_per_page'] = $per_page; - $args['post_type'] = 'post'; + $args['posts_per_page'] = $per_page; + + if ( empty( $args['post_type'] ) ) { + $args['post_type'] = 'post'; + } + $args['paged'] = $request['page_number']; $args['ignore_sticky_posts'] = 1; $args['post_status'] = 'publish';