Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ' wordpress_footer_menu' not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 286
function.php
<?php
function wordpress_menu() {
register_nav_menu('primary','Top Navigation');
}
add_action('init','wordpress_menu');
function wordpress_footer_menu() {
register_nav_menu('footer','Footer Navigation');
}
add_action('init',' wordpress_footer_menu');
add_theme_support('post-thumbnails');
?>
header.php
<!DOCTYPE HTML>
<meta charset= "<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> | <?php wp_title(); ?>
<?php wp_head(); ?>
<div id="wrapper">
<div id="header">
<div id="logo">
<h2><?php bloginfo('name'); ?></h2>
<h4><?php bloginfo('description'); ?></h4>
</div>
<div id="menu">
<?php wp_nav_menu(array('theme_location' => 'primary')); ?>
</div>
</div>
footer.php
</div>
<div id="footer">
© wordpress.com All rights reserved.
</div>
<?php wp_footer(); ?>
index.php
<?php get_header(); ?>
<div id="body_content"></div>
<?php get_footer(); ?>
class-wp-hook.php
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if( ! $this->doing_action ) {
$args[ 0 ] = $value;
}
if ( $the_['accepted_args'] == 0 ) {
$value = call_user_func_array( $the_['function'], array() );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
$this->nesting_level--;
return $value;
}
What I have tried:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ' wordpress_footer_menu' not found or invalid function name in C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php on line 286