Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'category' not found or invalid function name in /home/splitpea/public_html/staging/wp-includes/plugin.php on line 525
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'company' not found or invalid function name in /home/splitpea/public_html/staging/wp-includes/plugin.php on line 525
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'collections' not found or invalid function name in /home/splitpea/public_html/staging/wp-includes/plugin.php on line 525
I get these three errors. I know it’s theme related and the category
, company
, and collections
are all custom taxonomies I have attached to custom post types that are manually added (no plug-in). I’ve been Googling this for hours. The only thing I can figure is that I’m using some function wrong somewhere. Here is the code for line 525 if this helps anyone:
do {
foreach ( (array) current($wp_filter[$tag]) as $the_ )
if ( !is_null($the_['function']) )
call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
} while ( next($wp_filter[$tag]) !== false );
I don’t know what more I can say about the issue. I’ll be monitoring this thread in case someone has an idea of what I’m dealing with or need more information.
Hi @atotalpirate
call_user_func_array() is a function to execute a function by its name. So, you need to have the category, company and collections function. You can create the functions like this:
function category($args) {
echo "do anything you want with this function";
}
function company($args) {
echo "do anything you want with this function";
}
function collections($args) {
echo "do anything you want with this function";
}
I hope this makes sense.