the_post

The timeline below displays how wordpress function the_post has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Iterate the post index in the loop.
 *
 * @since 1.5.0
 *
 * @global WP_Query $wp_query WordPress Query object.
 */
function the_post()
{
    global $wp_query;
    if (!isset($wp_query)) {
        return;
    }
    $wp_query->the_post();
}

WordPress Version: 5.3

/**
 * Iterate the post index in the loop.
 *
 * @since 1.5.0
 *
 * @global WP_Query $wp_query WordPress Query object.
 */
function the_post()
{
    global $wp_query;
    $wp_query->the_post();
}

WordPress Version: 4.4

/**
 * Iterate the post index in the loop.
 *
 * @since 1.5.0
 *
 * @global WP_Query $wp_query Global WP_Query instance.
 */
function the_post()
{
    global $wp_query;
    $wp_query->the_post();
}

WordPress Version: 4.3

/**
 * Iterate the post index in the loop.
 *
 * @since 1.5.0
 *
 * @global WP_Query $wp_query
 */
function the_post()
{
    global $wp_query;
    $wp_query->the_post();
}

WordPress Version: 3.7

/**
 * Iterate the post index in the loop.
 *
 * @see WP_Query::the_post()
 * @since 1.5.0
 * @uses $wp_query
 */
function the_post()
{
    global $wp_query;
    $wp_query->the_post();
}