I am trying to create a WordPress theme from scratch using bootstrap I am using a file I got from GitHub and have implemented a lot of things from it. You can find it in Github . The name is : twittem/wp-bootstrap-navwalker
now I am creating menus / registering menu area and have used the following code :
<?php
require_once('wp_bootstrap_navwalker.php');
//theme support
function theme_setup(){
//nav menu
register_nav_menus(array(
'primary' => __('Primary Menu')
));
}
//for the above function to work we need tocreate an addaction function, which lets us choose a hook to run it
//the one we want is aftr set up theme
add_action('after_setup_theme','wpb_theme_setup');
After doing this the menu shows up but there is an error above it which is :
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wpb_theme_setup' not found or invalid function name in C:\wamp\www\wordpress-bootstrap\bootstrap\wp-includes\plugin.php on line525
Call Stack
# Time Memory Function Location
1 0.0005 241464 {main}( ) ..\index.php:0
2 0.0007 244632 require( 'C:\wamp\www\wordpress-bootstrap\bootstrap\wp-blog-header.php' ) ..\index.php:17
3 0.0011 264688 require_once( 'C:\wamp\www\wordpress-bootstrap\bootstrap\wp-load.php' ) ..\wp-blog-header.php:13
4 0.0016 275768 require_once( 'C:\wamp\www\wordpress-bootstrap\bootstrap\wp-config.php' ) ..\wp-load.php:37
5 0.0027 402232 require_once( 'C:\wamp\www\wordpress-bootstrap\bootstrap\wp-settings.php' ) ..\wp-config.php:89
6 0.3356 21979856 do_action( ) ..\wp-settings.php:377
7 0.3357 21981408 call_user_func_array:{C:\wamp\www\wordpress-bootstrap\bootstrap\wp-includes\plugin.php:525} ( )
I dont know how to solve this error or what to do about it. Can someone please help.