Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'custom_scripts' not found or invalid function name in /home/.sites/149/site5056863/web/web/wp-includes/class-wp-hook.php on line 286

Hi everybody,

I have this php warning on my site:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘custom_scripts’ not found or invalid function name in /home/.sites/149/site5056863/web/web/wp-includes/class-wp-hook.php on line 286

I tried disabling all plugins but it doesn`t seem to be a plugin-problem.

Can anybody help me with this?

Hi Rosa,

Thanks for reaching out.

It’s due to this custom code from your child theme’s functions.php

add_action( 'wp_enqueue_scripts', 'custom_scripts', 9999 );

Please remove it, you have added an action but there is no code for function custom_scripts.

Thanks!

Thank you very much!!!

You’re welcome!
Thanks for letting us know that it has worked for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.