How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
One of the ways is to extend Walker_Page class. See comment in the code to know where changes go. class My_Siblings_CSS_Walker_Page extends Walker_Page { public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { if ( $depth ) { $indent = str_repeat( “\t”, $depth ); } else { $indent=””; … Read more