SOLVED: New link type taxonomy not showing as current page in navigation

Hi,
Thank you very much for adding “Terms” as a new link type. This is very handy for Woocommerce product categories. I’m using them in the navigation and think I’ve found a little bug.

The links added with the new link type don’t have the aria-current=“page” attribute when a user visits the taxonomy archive. However when I add the same link as a “Custom URL” the aria-current=“page” is added.

Example: these links link to the same woocommerce taxonomy archive. The first link uses the “Taxonomy (Term)” option, the second link the “Custom URL” option.

Bildschirmfoto 2024-09-04 um 10.22.32

Thank you for your help!
Kind regards,
Simone

Hi,

I was able to reproduce the issue locally and I’ve added it to the internal bug tracker. We will update this thread one the issue is solved.

Thank you a lot for the report!
M

1 Like

@Matej

Hello!

Any workaround at the moment as we have 4 product cat items that are not showing as current pages in the nav :frowning:

Thank you
Mike

Hi @mike1,

Not at the moment. Maybe you can manually style it with your own JS/CSS logic. But, the fix will be released in the next version (very soon), so maybe it’s better to wait. :slight_smile:


Matej

@Matej thank you thats great ! i have already done that if anyone one wants a fix to solve the issue below is the way.

JAVASCRIPT

document.addEventListener('DOMContentLoaded', function() {
    var currentUrl = window.location.href; 
    var links = document.querySelectorAll('a.brxe-text-link'); 

    links.forEach(function(link) {
        if (link.href === currentUrl) {
            link.classList.add('active-link');  
        }
    });
});

CSS

.active-link{
  color: red !important;
}

Hi guys,

We’ve fixed this issue in Bricks 1.11 BETA, now available as a manual download (Bricks – Account)

Please let us know if you are still experiencing issues.

You can see the full changelog here: Bricks 1.11 Changelog – Bricks

As with any beta release, please do not use it on a production/live website. It is only meant for testing in a local or staging environment.

Best regards,
Matej

1 Like