From f4d8723fc54095531bee6b72818930ffc0c9f231 Mon Sep 17 00:00:00 2001 From: g <> Date: Thu, 26 Nov 2020 12:33:10 +0300 Subject: [PATCH] LAW-3646 --- htdocs/wp-content/themes/lawcarta/functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index 64a4f14..ede0624 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -262,4 +262,13 @@ function meks_remove_wp_archives(){ } } +add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2); + +function special_nav_class ($classes, $item) { + if ($item->current){ + $classes[] = 'active '; + } + return $classes; +} +