Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'greenday_head' not found or invalid function name in /home/xnvrtebr/public_html/Blog/wp-includes/class-wp-hook.php on line 286

I have had this error for a while but didn't notice it because it's hidden on a black background.

I have looked up the code for class-wp-hook.php and here is line 286:

$value = call_user_func_array( $the_['function'], $args );

I am using an old wordpress theme, so there is no longer any support. I can't even find it online anymore. I'm not really sure what I'm doing. Help!

What code do I need to insert and where?

  • 1
    It just mean function with name greenday_head does not exists in you theme, while it is called on some action/filter. Search for greenday_head in your theme files (or plugin if it's coming from some plugin). Jan 22, 2018 at 7:16
  • This is impossible to answer without some access to the actual code, but if everything is functioning well, you can just add such a function that does nothing just to silence the error. Jan 22, 2018 at 7:25

1 Answer 1


I would start by creating in the themes functions.php a function like this

public function greenday_head($args) {
  return $args

It may be that $args are never passed in but it seems likely they are. If you want to try to find out what this is doing then you can add:

public function greenday_head($args) {
  echo '<pre>' . var_export($args, true) . '</pre>';
  echo '<pre>' . var_dump(debug_backtrace()) . '</pre>';
  return $args
  • Thanks very much but I managed to solve the issue after reverting to the default functions.php code/file
    – Doc Brown
    Sep 4, 2019 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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