Uma área de pesquisa sobre o WordPress para devs e autores do tema



in_the_loop ›

Desde2.0.0
Obsoleton/a
in_the_loop ( Sem parâmetros )
Retorna:
  • (bool) True if caller is within loop, false if loop hasn't started or ended.
Definido em:
Codex:

Determines whether the caller is in the Loop.

For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook.



Fonte

function in_the_loop() {
	global $wp_query;
	return $wp_query->in_the_loop;
}