wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_reset_postdata › WordPress Function

Depuis3.0.0
Dépréciéen/a
wp_reset_postdata ( Pas de paramètres )
Défini(e) dans:
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();
	}
}