WP_NAV_MENU filter targets all menus
You could try the following code snippet to override the primary menu: /** * Override the primary menu. * * @param string $nav_menu The HTML content for the navigation menu. * @param array $args Array of wp_nav_menu() arguments. * @return string $nav_menu */ function wpse_150003( $nav_menu, $args ) { //Override the primary menu: if( ‘primary’ … Read more