WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Query::the_post() WP 1.5.0

Sets up the current post.

Retrieves the next post, sets up the post, sets the 'in the loop' property to true.

Это метод класса: WP_Query

  • Global. WP_Post. $post
Хуки из метода

Ничего (null).


$WP_Query = new WP_Query();
$var = $WP_Query->the_post();

Код WP Query::the post: wp-includes/class-wp-query.php VER 5.0.3

public function the_post() {
	global $post;
	$this->in_the_loop = true;

	if ( $this->current_post == -1 ) // loop has just started
		 * Fires once the loop is started.
		 * @since 2.0.0
		 * @param WP_Query $this The WP_Query instance (passed by reference).
		do_action_ref_array( 'loop_start', array( &$this ) );

	$post = $this->next_post();
	$this->setup_postdata( $post );