I am adding a specific class on my wp_nav_menu via function.php but I am not able to target a specific menu: This is what I got
function add_menuclass_active
Theme location is stored in the nav menu arguments, you need to add it in your function parameters:
function add_menuclass_active( $nav_menu, $args ) { if( $args->theme_location == 'CUSTOM MENU' ) return preg_replace( '/