Skip to content
Advertisement

Tag: wordpress-theming

Headers already sent error with get_template_part in REST API call

I’ve looked at multiple other questions about this warning (Headers already sent…etc) and this thorough explanation, but I’m not finding a solution for the circumstances I’m dealing with: I have a custom Wordpress REST API endpoint that returns the output of get_template_part. When I just call get_template_part normally on a page, there’s no warning. It only appears when it runs

WordPress debug – call_user_func_array() expects parameter 1 to be a valid callback

I’ve just updated my WordPress to a new version & I’m getting this error: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘restrict_admin’ not found or invalid function name in /home/burngeopk/public_html/members/wp-includes/class-wp-hook.php on line 287 There is only 1 string that has restrict_admin in my theme’s function.php. I am looking for guidance how to rephrase this string to

Advertisement