In case you have not yet seen this, jQuery(function() { jQuery('.current-menu-parent').parent().parent().addClass('current-menu-ancestor'); jQuery('.current-menu-parent').addClass('current-menu-item'); jQuery('.current-menu-parent > a').addClass('witharrow'); });