WP_Query::next_post
Sets up the next post and iterate current post index.
Метод класса: WP_Query{}
Хуков нет.
Возвращает
WP_Post. Next post.
Использование
global $wp_query; $wp_query->next_post();
Список изменений
| С версии 1.5.0 | Введена. |
Код WP_Query::next_post() WP Query::next post WP 7.0
public function next_post() {
++$this->current_post;
/** @var WP_Post */
$this->post = $this->posts[ $this->current_post ];
return $this->post;
}