Mysterious "Call to undefined function get_header()" error logged in my theme directory, can't figure out why
It seems like every couple of days I'll ftp into this particular WordPress site and there will be a small error log in my theme directory, with the "Call to undefined function get_header()" error maybe 5 or 6 times on the theme index file.
I have navigated every single page of the site, every single post, every single attachment, every section in the admin back end, filled out every form, and no matter what I do I can't reproduce the error. However, after a couple of days I'll ftp in and see that it had happened a few more times.
This is no big deal as my site is 100% functional, and the size of the error log is insignificant, but I'm just going nuts trying to figure out why it's happening.
I've seen this on a number of sites and a number of different themes, and I think the errors are the results of bot traffic hitting theme files other than index.php I don't know for sure, but the errors are so hit and miss that I figure that's what is happening.
If your error log also logs the times of the errors, see if there are 404 errors (in your 404 log, or set one up) that correspond to the same times. Or try and match up IPs, if both error logs also record the IP. Either will give you more of an idea of what's happening.
Asked in February 2016Viewed 3,473 timesVoted 9Answered 2 times