-
AuthorPosts
-
May 17, 2017 at 2:59 pm #794904
Hi
I consider how I can set indicator (or just font colour) for main menu item when user is in portfolio item which are child in breadcrumb hierarchy.
Please find description here
Generally my goal is to show visual in menu that user is in current category. Maybe that is another way?
Thank you in advanced
Krzysztof-
This topic was modified 8 years, 5 months ago by
Krzysztof.
May 17, 2017 at 7:31 pm #795049Dzien dobry Krzysztof!
Please add following code to Functions.php file in Appearance > Editor
add_filter( 'body_class', function( $classes ) { if(is_singular('portfolio') && has_term('substrates', 'portfolio_entries')) { $classes = array_merge( $classes, array( 'single-substrates' ) ); } return $classes; });then please add following code to Quick CSS
.single-substrates li#menu-item-191 .avia-menu-fx { opacity: 1; visibility: visible; } .single-substrates li#menu-item-191 a { color: #008B98 !important; }Best regards,
YigitMay 17, 2017 at 8:33 pm #795075Hi Yigit
Your polish is excelent!
Your code works great for substrates. What I do to apply also for troubleshooting?
BR
KrzysztofMay 17, 2017 at 8:41 pm #795079Hi,
Dzieki! Courtesy of a weekend spent in Warsaw :)
Please add following code to Functions.php file as well
add_filter( 'body_class', function( $classes ) { if(is_singular('portfolio') && has_term('troubleshooting', 'portfolio_entries')) { $classes = array_merge( $classes, array( 'single-troubleshooting' ) ); } return $classes; });then add following code to Quick CSS
.single-troubleshooting li#menu-item-188 .avia-menu-fx { opacity: 1; visibility: visible; } .single-troubleshooting li#menu-item-188 a { color: #008B98 !important; }Best regards,
YigitMay 17, 2017 at 9:00 pm #795083Hi Yigit
Thank you again.
I invite you for a beer, when you visit Poland again. I live in Szczecin, it is north of Poland.
BR
KrzysztofMay 17, 2017 at 9:22 pm #795088 -
This topic was modified 8 years, 5 months ago by
-
AuthorPosts
- The topic ‘Main menu the same indicator for child in breadcrumb hierarchy’ is closed to new replies.
