0

I am getting these errors:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in C:...\class-wp-hook.php on line 298

Warning: Cannot modify header information - headers already sent by (output started at C:...\www\customTheme\wp-login.php on line 394 <- and line 407

After I add a custom post type and call:

add_action('after_setup_theme', PostTypeCreate_Works());

Because of these warnings I am getting this error on the login: Cookies are blocked due to unexpected output.

Anyone know why this is happening?

0

read https://developer.wordpress.org/reference/functions/add_action/

then use:

add_action('after_setup_theme', 'PostTypeCreate_Works');

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.