解决方案是在函数和curl路由中添加一个$page输入值,该值表示以如下路由结束的页码
curl-i websitename/wp-json/posts/page\\u编号
其中$page是page\\u编号
public function posts($page){
$args = array(
\'author\' => $id,
\'posts_per_page\' => 24,
\'offset\' => 0,
\'meta_key\' => $meta_key,
\'orderby\' => $orderby,
\'order\' => \'DESC\',
\'paged\' => $page,
\'post_type\' => \'videos\',
\'post_status\' => \'publish\',
\'suppress_filters\' => true );