Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #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 ago by Morticka. Reason: Moved links to private data
    #478108

    Hi Morticka!

    Please disable cache of the site, and give us backend access.

    Regards,
    Basilis

    #478318

    Okay, see private content.

    • This reply was modified 9 years ago by Morticka.
    #478328

    Hey 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,
    Yigit

    #478329

    Hey Yigit :),

    I tried it, but it did not work?

    Sincerely,
    Barb

    #478330

    Hi Barb :)

    Please make sure that > sign is not converted to – http://i.imgur.com/IDXRZQ3.png in Quick CSS field

    Regards,
    Yigit

    #478338

    Hi 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,
    Barb

    #479115

    Hey 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,
    Yigit

    #479139

    Hi 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,
    Barb

    #481295

    Hi!

    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!
    Yigit

    #483171

    Hi 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,
    Barb

    #483235

    Hi 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!
    Yigit

    #483294

    Hi 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,
    Barb

    #483299

    Hi!

    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,
    Yigit

    #483315

    Hi 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,
    Barb

    #483324

    Hi 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!
    Yigit

    #483373

    Hey 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,
    Barb

    #483377

    Hey!

    You are welcome Barb! Always happy to help :)
    Have a great rest of the day!

    Cheers!
    Yigit

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘Navigation underline on active items not visible’ is closed to new replies.