Tagged: navigation, not visible, underline
-
AuthorPosts
-
July 24, 2015 at 10:12 am #478099
Hi guys,
When I select a page in the main menu the underline is visible. See 1. link in private data.
But as soon as I select an article on that page, the underline is not visible anymore, See 2. link in private data.
How can I fix it so that the underline is always visible on active pages?
Sincerely,
Morticka- This topic was modified 9 years, 3 months ago by Morticka. Reason: Moved links to private data
July 24, 2015 at 10:30 am #478108Hi Morticka!
Please disable cache of the site, and give us backend access.
Regards,
BasilisJuly 24, 2015 at 5:32 pm #478318Okay, see private content.
- This reply was modified 9 years, 3 months ago by Morticka.
July 24, 2015 at 6:05 pm #478328Hey Barb!
Would you like to have ‘tips and tricks’ underlined on all single posts? If so, please add following code to Quick CSS in Enfold theme options under General Styling tab
.single-post li#menu-item-1739>a>.avia-menu-fx { opacity: 1; visibility: visible; }
Best regards,
YigitJuly 24, 2015 at 6:08 pm #478329Hey Yigit :),
I tried it, but it did not work?
Sincerely,
BarbJuly 24, 2015 at 6:13 pm #478330Hi Barb :)
Please make sure that > sign is not converted to – http://i.imgur.com/IDXRZQ3.png in Quick CSS field
Regards,
YigitJuly 24, 2015 at 6:33 pm #478338Hi Yigit :),
Yes it worked, but now every single post underlines tips and tricks. Even when I go to Blog in the menu and select an article, then the underline appears at tips and tricks.
Do you have a fix that only the active pages in a menu link underline?
Sincerely,
BarbJuly 27, 2015 at 3:36 pm #479115Hey Barb!
Please refer to this post – http://kriesi.at/documentation/enfold/change-archive-categorytag-blog-style/ and change category style to match your blog style and then set your category page as Tips & Tricks page in the main menu. You are using two different blogs and using Tips & Tricks page to display Tips & Tricks category, but on single posts, it will not be recognized as parent page.
Best regards,
YigitJuly 27, 2015 at 4:14 pm #479139Hi Yigit,
I’m not sure I know what you mean?
I’m not using the “And where do you want to display the blog” option in the styling pages.
I am however using the ALB Blog articles content element and from there I select the category I want to display. So in the main menu Tips & Tricks page I select the articles with the tips & tricks category and on the Blog page I select the blog category.
In both cases the single posts are not recognized. Furthermore I cannot style a category with the ALB?
Is there another option?
Sincerely,
BarbJuly 31, 2015 at 1:03 pm #481295Hi!
Sorry for the late reply Barb!
No, unfortunately you cannot style a category using ALB. But you can refer to this post to change its layout – http://kriesi.at/documentation/enfold/change-archive-categorytag-blog-style/
I believe that would be the only workaround in your case. You can get category links and add them as menu items so single posts should be recognized.
The way you are using blog posts ( 2 different categories without blog page chosen ) it does not seem easily possible to make the changes you would like :/Cheers!
YigitAugust 5, 2015 at 9:52 am #483171Hi Yigit,
I don’t understand how to fix this. Because it is not just the blog/archive page that does not show an active (underline) link, if you have subpages in the menu the link is not active either.
So basically the active underline link in the main menu works with only top pages? That is not very user friendly, because then you have only the breadcrumb trail where users can see where they are?
Is there a solution for the active link for subpages? So you can see where you are in the main menu?
Sincerely,
BarbAugust 5, 2015 at 11:49 am #483235Hi Barb!
I have added following code to bottom of functions.php file of your child theme
function add_custom_style(){ if(in_category( 'tips-tricks' ) && is_single()) { ?> <style> li#menu-item-1739 .avia-menu-fx { visibility: visible; opacity: 1; } </style> <?php }} add_action('wp_head', 'add_custom_style');
It is kind of hack but should work fine as a workaround. Please review your website now :)
Cheers!
YigitAugust 5, 2015 at 1:29 pm #483294Hi Yigit,
You are the man, it works great!!! I knew you could do it :D :D :D
Is there also a way to do this with the main menu blog link as well? (I have not selected the “use this page as blog” option in the settings, just named the main menu link “Blog”)
I tried to copy your code and changed tips-tricks into blog, but then WordPress died, so I had to remove it again :)
Sincerely,
BarbAugust 5, 2015 at 1:36 pm #483299Hi!
Sorry Barb, i killed it as well. Can you please change the code to following one via FTP
function add_custom_style(){ if(in_category( 'tips-tricks' ) && is_single()) { ?> <style> li#menu-item-1739 .avia-menu-fx { visibility: visible; opacity: 1; } </style> <?php } elseif(in_category( 'blog' ) && is_single()) { ?> <style> li#menu-item-1453 .avia-menu-fx { visibility: visible; opacity: 1; } </style> <?php }} add_action('wp_head', 'add_custom_style');
Regards,
YigitAugust 5, 2015 at 1:50 pm #483315Hi Yigit :),
Haha, no worries, I revived WordPress and it works!!!
But, I have more categories in the main menu link Blog, like actueel and humor. I tried copying your (“blog”) code again and change it to the other categories, but then WordPress died again.
How can I do the same with the other categories?
Sincerely,
BarbAugust 5, 2015 at 1:58 pm #483324Hi Barb! :)
I adjusted the code once again. Now every single post with category other than “tips and tricks” highlights Blog menu item. Is this what we wanted to achieve? If so, please review your website now :)
Cheers!
YigitAugust 5, 2015 at 2:50 pm #483373Hey Yigit :),
Yes perfect, that is what I meant, it works!!!!
Thank you so very much for you help, this topic can be closed! :D
Sincerely,
BarbAugust 5, 2015 at 2:53 pm #483377 -
AuthorPosts
- The topic ‘Navigation underline on active items not visible’ is closed to new replies.