I've successfully added a few classes to the first ul in wp_page_menu,
however, I haven't been able to add a class to the child ul nested in the first li.
Anyone know what is missing?
function add_menuclass($ulclass) {
return preg_replace('/<ul>/', '<ul class="clearfix rMenu-hor rMenu">', $ulclass, 1);
}
function add_sub_menuclass($ulchildclass) {
return preg_replace('/<ul>/', '<ul class="rMenu-expand">', $ulchildclass, 2);
}
add_filter('wp_page_menu','add_menuclass','add_sub_menuclass')
I entered the tail level to "2", see:
$ulchildclass, 2);
I tried adding a div as 'TheFrosty' suggested in the comments on this themeshaper tutorial: http://themeshaper.com/adding-class-...ess-page-menu/, but no go.
Can anyone help?