Editing or filtering the output of the Genesis navigation

You could try to use the wp_nav_menu_args filter (untested): /** * Add the Menu_With_Data_Attr walker to the wp_nav_menu() used by genesis_do_nav() */ add_filter( ‘wp_nav_menu_args’, function( $args ){ if( isset( $args[‘menu_class’] ) && ‘menu genesis-nav-menu menu-primary’ === $args[‘menu_class’] ) { if( class_exists( ‘Menu_With_Data_Attr’ ) ) { $args[‘walker’] = new Menu_With_Data_Attr(); } } return $args; }); to … Read more

How to remove trailing tags from wp_nav_menu walker

just been reading an article on removing <li> elements from wp_nav_menu (http://css-tricks.com/snippets/wordpress/remove-li-elements-from-output-of-wp_nav_menu/) and the code suggested is $menuParameters = array( ‘container’ => false, ‘echo’ => false, ‘items_wrap’ => ‘%3$s’, ‘depth’ => 0, ); echo strip_tags(wp_nav_menu( $menuParameters ), ‘<a>’ ); have you tried this ?

Add div to specific sub-menu

The WordPress native Walker class doesn’t pass the arguments you need to the start_lvl() method. So to do this, you will need to add a custom display_element() method to your custom walker. You can use most of the original, with something similar to the commented section below: public function display_element( $element, &$children_elements, $max_depth, $depth, $args, … Read more

Customizing a walker menu class

I think Your looking for the solution : http://shinraholdings.com/62/custom-nav-menu-walker-function/ Add this code where you calling your WP menu. wp_nav_menu( array( ‘theme_location’ => ‘navigation_menu_primary’, ‘container’ => ‘div’, ‘container_id’ => ‘top-navigation-primary’, ‘conatiner_class’ => ‘top-navigation’, ‘menu_class’ => ‘menu main-menu menu-depth-0 menu-even’, ‘echo’ => true, ‘items_wrap’ => ‘%3$s’, ‘depth’ => 10, ‘walker’ => new themeslug_walker_nav_menu ) ); // thanks … Read more

start_lvl on Walker is not working

Your menu doesn’t appear to have any levels. start_lvl and end_lvl are used for the sub-menu wrappers. The outer wrapper for the menu, the <ul> is defined by the items_wrap argument of wp_nav_menu(): wp_nav_menu( [ ‘walker’ => new My_Walker(), ‘items_wrap’ => ‘<nav id=”%1$s” class=”%2$s”>%3$s</nav>’, ] );

Check if wp_nav_menu items have submenus

If I understand correctly, you want links with submenus to have an attribute of aria-haspopup. If this is correct, you should be able to do so using the nav_menu_link_attributes filter (WP 3.6 and above). You can also get around the necessity of having to write a custom Walker to check if an item has children … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)