Wordpres debug.log PHP Notice: is_singular was called
Question
I have started to get alot of “is_singular was called” and “is_page was called” in my debug.log
[31-May-2020 12:10:27 UTC] PHP Notice: is_page was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /wp-includes/functions.php on line 5167
[31-May-2020 12:10:27 UTC] PHP Notice: is_singular was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /wp-includes/functions.php on line 5167
On the line 5167 in function.php has this code
sprintf(
/* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message. */
__( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ),
$function,
$message,
$version
),
E_USER_NOTICE
);
Anyone could help me in the right direction in how to solve this?
Thank you so much
Best regards
Gabriel
0
errors, notices, wordpress.org, wp-debug
3 years
2020-05-31T08:10:21-05:00
2020-05-31T08:10:21-05:00 0 Answers
108 views
0
Leave an answer