Created
September 14, 2023 09:16
-
-
Save yxod/e3926bae7de40cac9e85100e492b6bde to your computer and use it in GitHub Desktop.
Wordpress: remove cycled link menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wp_nav_menu_no_current_link($atts, $item, $args, $depth) | |
{ | |
if ($item->current) $atts['href'] = ''; | |
return $atts; | |
} | |
add_filter('nav_menu_link_attributes', 'wp_nav_menu_no_current_link', 10, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment