From 2a3d86b31663488babb97c22fbc1f41c838abcb8 Mon Sep 17 00:00:00 2001 From: g <> Date: Tue, 5 Jan 2021 14:11:46 +0300 Subject: [PATCH] LAW-3909 --- htdocs/wp-content/themes/lawcarta/footer.php | 4 ++-- htdocs/wp-content/themes/lawcarta/functions.php | 9 +++++++++ .../themes/lawcarta/page-publish-your-book.php | 4 ++-- htdocs/wp-content/themes/lawcarta/page_home.php | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/wp-content/themes/lawcarta/footer.php b/htdocs/wp-content/themes/lawcarta/footer.php index 7fc1e4d..ab7160c 100644 --- a/htdocs/wp-content/themes/lawcarta/footer.php +++ b/htdocs/wp-content/themes/lawcarta/footer.php @@ -51,11 +51,11 @@ require_once 'inc/walker-nav-menu.php';
Subscribe
-
+
- +
diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index ede0624..4947e87 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -271,4 +271,13 @@ function special_nav_class ($classes, $item) { return $classes; } +function add_custom_class($classes=array(), $menu_item=false) { + //todo: detect blog post page + if ( !is_page() && 'blog' == strtolower($menu_item->title) && + !in_array( 'active', $classes ) ) { + $classes[] = 'active'; + } + return $classes; +} +add_filter('nav_menu_css_class', 'add_custom_class', 100, 2); diff --git a/htdocs/wp-content/themes/lawcarta/page-publish-your-book.php b/htdocs/wp-content/themes/lawcarta/page-publish-your-book.php index 2bca629..c2a1c5b 100644 --- a/htdocs/wp-content/themes/lawcarta/page-publish-your-book.php +++ b/htdocs/wp-content/themes/lawcarta/page-publish-your-book.php @@ -19,11 +19,11 @@

With one-on-one support from our team, you can focus on writing and we'll get your book e-ready and print-ready in no time. Personalize your book settings to control how your book is used and publish new editions and revisions instantly. A fully flexible publishing solution from start to finish.

-
+
- +
diff --git a/htdocs/wp-content/themes/lawcarta/page_home.php b/htdocs/wp-content/themes/lawcarta/page_home.php index 16296a6..aa27e29 100644 --- a/htdocs/wp-content/themes/lawcarta/page_home.php +++ b/htdocs/wp-content/themes/lawcarta/page_home.php @@ -59,10 +59,10 @@ get_header();
-
+
- +