0

I can't seem to find what's causing the error to show up when I enabled the debug mode on my WordPress website that is installed locally.

Notice: is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /Applications/MAMP/htdocs/hostingfacts/wp-includes/functions.php on line 4139

Is this some plugin issue?

P.S. I'm using MAMP

0

The error itself is not because debug mode, it seems that the hook you're using is being called before the $wp_query is set.

what you can do is put inside your function

function your_error_function(){
        global $wp_query;
        if(! isset( $wp_query )){
          return 
        }
    ...rest of my code
}

or change the hook you're using to another that is called later, something like 'loop_start' should do.

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.