File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,13 @@ Place **class-wp-bootstrap-navwalker.php** in your WordPress theme folder `/wp-c
3737Open your WordPress themes ** functions.php** file - ` /wp-content/your-theme/functions.php ` - and add the following code:
3838
3939``` php
40- // Register Custom Navigation Walker
41- require_once get_template_directory() . '/class-wp-bootstrap-navwalker.php';
40+ /**
41+ * Register Custom Navigation Walker
42+ */
43+ function register_navwalker(){
44+ require_once get_template_directory() . '/class-wp-bootstrap-navwalker.php';
45+ }
46+ add_action( 'after_setup_theme', 'register_navwalker' );
4247```
4348
4449If you encounter errors with the above code use a check like this to return clean errors to help diagnose the problem.
You can’t perform that action at this time.
0 commit comments