• vanbrel

    (@vanbrel)


    Hi

    I’m using the vertcal header and I have submenu-items. After clicking such an menu-link the page is displayed and the link collapses. Does anybody know a way to make the active link still visible???

    Thanks!

    Hans

Viewing 5 replies - 1 through 5 (of 5 total)
  • Shahin

    (@skalanter)

    Hello @vanbrel,

    Thank you for reaching out,

    Unfortunately, this feature is not available as an option in the theme, but you can achieve it with a simple customization. There are two steps:

    Add the following CSS:

    #site-navigation-wrap .current-menu-ancestor > .sub-menu,
    #site-navigation-wrap .current-menu-parent > .sub-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
    }

    Then add the following JavaScript:

    jQuery(document).ready(function($) {
        $('.current-menu-ancestor, .current-menu-parent').addClass('open');
    });

    Place them in the appropriate CSS and JS sections inside the Customizer.
    You can read this link for more information about the CSS/JS code on the customizer: https://docs.oceanwp.org/article/354-add-custom-css-and-js-to-your-website.
    This should resolve the issue.

    Note: If you have any cache plugin or server cache(CDN / Browser Cache and Cookies and …), you need to clear its cache contents or disable them to see your changes. Also, remember to click on the regenerate all assets file and data in Elementor > Tools(if you have Elementor).

    Hope it helps,
    Best Regards

    Thread Starter vanbrel

    (@vanbrel)

    Hi

    I tried this – but nothing happend – the problem remains.

    Hans

    Shahin

    (@skalanter)

    Hello @vanbrel,

    Thank you for reaching out,

    This case is not considered a problem, because the feature you’re looking for doesn’t exist in the theme as you want it.

    If the code above doesn’t work, it’s probably because the way you’ve built your header is different. In any case, to achieve what you want, you’ll need to customize it, but feel free to use the above code as a hint to achieve your goal.

    Another option is to search the WordPress repository at wp.org/plugins for a plugin that offers such functionality. To create a custom header, check out this article: https://docs.oceanwp.org/article/355-how-to-create-a-custom-header.

    I hope it helps,
    Best Regards

    Thread Starter vanbrel

    (@vanbrel)

    Hi

    I didn`t build my own header; I just choose the “vertical header” in the customizer.

    Ciao

    Hans

    Shahin

    (@skalanter)

    Hello @vanbrel,

    Thank you for the update.

    It’s possible that due to caching or certain customizations, this tweak might not work as expected. I recommend creating your own customization or using a third-party plugin for this. The code above works on a fresh install with default options on my test site.

    Best Regards

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘active link visible’ is closed to new replies.