• [ Moderator note: moved to Fixing WordPress. ]

    I have the following error appearing in my error log but absolutely no idea where to find out what’s causing this in my template files.

    PHP Fatal error: Call to a member function get_queried_object() on null in wp-includes/nav-menu-template.php on line 275

    Line 275 is

    $queried_object = $wp_query->get_queried_object();

    Any ideas?

    • This topic was modified 6 years, 9 months ago by greencode.
    • This topic was modified 6 years, 9 months ago by greencode.
    • This topic was modified 6 years, 9 months ago by greencode.
    • This topic was modified 6 years, 9 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi there @greencode

    Does this happen if you deactivate all plugins and use a core theme like Twenty Seventeen?

    Thread Starter greencode

    (@greencode)

    Sorry I didn’t reply sooner… Even if I do that on a staging site it’ll still be tricky for me to narrow down what the cause is as I don’t know what page that error is happening on.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Call to a member function get_queried_object() on null in nav-menu-template.php’ is closed to new replies.