Petite fonction pratique:
// Add ID and CLASS attributes to the first <ul> occurence in wp_page_menu
function add_menuclass($ulclass) {
return preg_replace('/<ul>/', '<ul id="nav" class="sa_classe">', $ulclass, 1);
}
add_filter('wp_page_menu','add_menuclass');
Laisser un commentaire