SOLVED: Nav (nestable): Active link styles not working for active Posts page

Browser: Version 0.109.0 (39665) Chromium Engine Version 114.0.5735.133
OS: macOS

One of the links in my navigation is the page I’ve designated as my Posts page (in WP Settings > Reading).

With the original Nav Menu element, I set active styles in the element’s settings panel, and the menu link to my Posts page has the active styles.

With the new Nav (nestable) element, I also set the same active styles in the element’s settings panel (the same styles). The menu link to my Posts page does not have the active styles.

All other links are showing the active styles I’ve set. Only the Posts page does not.

I’ve double checked I’m linking to my posts page properly in the Nav Link element settings (Internal Post/Page > Blog).

Several students on a Bricks course that I teach are reporting the same issue.

Happy to record a video and/or provide a login if required.

2 Likes

Hi Dave,
Thanks so much for your report!

I reproduced the issue and added it to our bug tracker.

Best regards,
timmse

Hi Dave,
We’ve fixed this bug in Bricks 1.8.2, now available as a one-click update in your WordPress Dashboard.

Please let us know if you are still experiencing issues.

Best regards,
timmse

After updating to 1.8.3 - it’s still an issue. Normal pages work fine, but posts page is not getting aria-current atribute.

Hi Jack,
It works fine for me :thinking:

A live link and more information about your setup would be helpful.

I’ve recreated it in Bricks Playground:
https://try.bricksbuilder.io/t8d9115e

There’s a menu with 3 top elements, the first one is just a megamenu, it’s not relevant. The other two are links within nestable nav element.

Standard page menu item turns red when you are on standard page - works fine.

Blog menu item doesn’t turn red when you are on blog page, and when inspected, it’s missing the [aria-current=“page”] atribute or anything else that could be styled to get it to work.

Ok, please insert a new nav nestable element and test it again. I am sure it will work then.

Looking at your markup, you probably created the menu in a previous version. Since then, the markup has changed a bit.

I’ve updated the header and added a new container with the new Nav (Nestable) element.
https://try.bricksbuilder.io/t8d9115e

The problem is still there.

Then something else is wrong. Please send me the access data to your try.bricks… installation via private message.

My test: Blog – Try Bricks – ted545f0

I’ve sent you a private message with login info.

Thanks! It works if you choose internal post/page and choose blog :slight_smile:
You had set the link to external; apparently, that makes a difference. Since it is an internal page, internal should be the first choice.

I’m using it with Meta Box custom fields so I need to use external page url. It works with standard pages so I hoped it would work with a blog page too. Any chance it could be fixed in the future?

Of course, if you create a separate report that contains reproducible steps.
This report is not about dynamic data, so it is a different problem :v:

I agree but it’s not working with static content too, when I set the url of /blog/ for a nav item inside Nav(Nestable) via the external Url option, it doesn’t work - but only for blog posts page. Category pages and other archive pages work fine same as standard pages.

EDIT: I’ve created a separate bug report. Blog page (posts page) linked in Nav(Nestable) element doesn't get aria-current atribute

It will be useful also to set aria current on the BLOG (or generic taxonomy category link) when opening a single post of blog (or category).