Put class on instead li

If you use your custom Walker class, then there’s no point in using filters for adding these classes. Let’s take a look at this part of your code: $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( $classes ), $item, $args ) ); $class_names = $class_names ? ‘ class=”‘ . esc_attr( $class_names ) . ‘”‘ : … Read more

Is this format possible with a custom Nav Walker class?

Yes, it is possible… All you need is to write your own Walker class. Here’s a starting point: class My_Custom_Walker_Nav_Menu extends Walker_Nav_Menu { public function start_lvl( &$output, $depth = 0, $args = array() ) { if ( $depth ) { $output .= ‘<aside><a href=”#” class=”custom-class”>Sub Menu Trigger</a><div>’; } } public function end_lvl( &$output, $depth = … Read more

Remove unwanted elements for a wp_nav_menu

I got it to work by reconfiguring the walker class custom_menu extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( “\t”, $depth ) : ”; $class_names = $value=””; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( … Read more

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