Answer the question
In order to leave comments, you need to log in
"Uncaught Error: Call to undefined function WP_Bootstrap_Navwalker()" error?
How to fix the error, like I did everything as described in the documentation.
Downloaded file from github
Connected this file to functions.php
/**
* Bootstrap nav walker.
*/
if ( ! file_exists( get_template_directory() . '/class-wp-bootstrap-navwalker.php' ) ) {
// file does not exist... return an error.
return new WP_Error( 'class-wp-bootstrap-navwalker-missing', __( 'It appears the class-wp-bootstrap-navwalker.php file may be missing.', 'wp-bootstrap-navwalker' ) );
} else {
// file exists... require it.
require get_template_directory() . '/inc/class-wp-bootstrap-navwalker.php';
}
Answer the question
In order to leave comments, you need to log in
As far as I understand, one needs to create an instance of the class, not just call it as a function.
what you have written below new WP_Bootstrap_Navwalker();
is exactly what you need.
Все разобрался.
В этом коде
перед class нужно прописать /inc/class-wp-boot....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question