Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress WordPress Theme Development WordPress Header and Footer Templates Porting existing headers and footers into WordPress

Vladimir Miletic
Vladimir Miletic
6,201 Points

Getting an error

( ! ) Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wpt_theme_style' not found or invalid function name in C:\Users\vladda\Documents\Websites\www.mywp.dev\wp-includes\class-wp-hook.php on line 298

1 Answer

Kevin Korte
Kevin Korte
28,109 Points

Without seeing the code, it's hard to tell, but for whatever reason, it can't find the function wpt_theme_style, so make sure that the function exists, and probably needs to be defined and loaded before your call it with call_user_func_array()