wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_reset_postdata › WordPress Function

Since3.0.0
Deprecatedn/a
wp_reset_postdata ( No parameters )
Defined at:
Codex:

After looping through a separate query, this function restores the $post global to the current post in the main query.



Source

function wp_reset_postdata() {
	global $wp_query;

	if ( isset( $wp_query ) ) {
		$wp_query->reset_postdata();
	}
}