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
Post a Comment