Wordpress: set ul menu class based on parent li class -



Wordpress: set ul menu class based on parent li class -

how can that? working on custom menu funcitonality, know have work start_lvl

public function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat( "\t", $depth ); $classes = get_parent_menu_item_classes(); // need if ( in_array( 'column-header', $classes ) ) { // classes here $output .= "\n$indent<ul role=\"menu\" class=\" nav nav-list\">\n"; } else { $output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n"; } }

please advise :)

wordpress drop-down-menu

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -