我有一个 Wordpress Bootstrap 网站。我为下拉菜单功能实现了 WP Bootstrap Navwalker,没有问题。我使用此处提供的代码示例按照说明进行操作:https ://github.com/wp-bootstrap/wp-bootstrap-navwalker 。一切都很好。
但是,下拉图标在左侧!
我添加了几个不同的图标只是为了测试,但它总是显示在左侧。我将其更改为向右箭头,因为它困扰着我。
我用于代码的内容正是他们网站上的内容,例如稍作修改。
wp_nav_menu(array(
'theme_location' => 'menu-1',
'container' => 'div',
'container_class' => 'navbar-collapse collapse',
'container_id' => 'navcol-1',
'menu_class' => 'nav navbar-nav ml-auto',
'depth' => 2,
'echo' => true,
'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
'walker' => new WP_Bootstrap_Navwalker()
));
?>
if ( ! file_exists( get_template_directory() . '/inc/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_once get_template_directory() . '/inc/class-wp-bootstrap-navwalker.php';
}
add_action( 'after_setup_theme', 'register_navwalker' );
任何人都遇到过这个,或者可能知道我做错了什么?
