wp-bootstrap-starter owerwrite wp_bootstrap_navwalker.php in child
-
I am using wp-bootstrap-starter (actual version of WP+theme) and would like to owerwrite wp_bootstrap_navwalker.php in child-theme.
I found a lot of posts how to do this, but nothing does work.1. put file in my child folder in inc-folder. No change works.
2. I wrote in functions.php
/** * Register Custom Navigation Walker */ function register_navwalker(){ require_once get_stylesheet_directory() . '/inc/wp_bootstrap_navwalker.php'; } add_action( 'after_setup_theme', 'register_navwalker' );<code></code> Change does not work. Change shoud be: <code></code>//FROM $atts['href'] = '#'; $atts['data-toggle'] = 'dropdown'; $atts['aria-haspopup'] = 'true'; $atts['aria-expanded'] = 'false'; $atts['class'] = 'dropdown-toggle nav-link'; $atts['id'] = 'menu-item-dropdown-' . $item->ID; //TO $atts['href'] = ! empty( $item->url ) ? $item->url : ''; $atts['aria-haspopup'] = 'true'; $atts['aria-expanded'] = 'false'; $atts['class'] = 'dropdown-toggle nav-link'; $atts['id'] = 'menu-item-dropdown-' . $item->ID;I would like to get first level links to work.
The topic ‘wp-bootstrap-starter owerwrite wp_bootstrap_navwalker.php in child’ is closed to new replies.
