1

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

If I were to hazard a guess, I would say you recently started using a theme or plugin or that one of those was recently updated. The error indicates that things are happening in the wrong order. This is not critical but somewhere some expected feature is probably not happening quite the way it was intended.

Your first step is to identify what is new (installed or updated) try switching them out one at a time and see for which one the errors stop when it is not in use. that one is your culprit.

1
  • Thank you for your answer. It´s not possible to trace somewho where the error is comming from? – Gabriel Jun 4 '20 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.