I’m not quite sure if this is a bug or if I’m just misunderstanding the function. I’m building a menu with the new nav block and I want to highlight the current page.
To my understanding this should be achievable under styles > nav links > current page. But nothing happens if I change the styles there.
Sorry to hear you’re experiencing trouble with this.
Unfortunately, I haven’t been able to reproduce this error on my end.
As I don’t have enough information on your setup, I cannot determine what might be going wrong.
Could you possibly confirm you are on the latest version?
Additionally, do the styles not apply in the editor or on the frontend?
Thank you in advance.
Mhh, I’ve tested in on two sites. Both have the newest cwicly version. One site has woocommerce installed, the other only cwicly. I also regenerated html/css.
The styles don’t apply on backend and frontend. If I inspect the html code on the frontend, there’s no “current” class or something similar applied to the menu link of the current page. Otherwise I would easily do it with relative styling.
Hi. i also have the same issue. theres no current class on navlink if its current page. have you solve this issue?
also I cannot see data attribute aria.
No, I haven’t solved it yet. But I haven’t paid much attention to it in the last few days either.
Sorry to hear about the trouble you’re experiencing here.
Might I ask how you are applying the links? Are these custom URLs or are you using the post selector in the URL input field?
If these are custom URLs, this might be an issue on our side that should be fixed in the next update.
One is a custom link to a page. If I seach for that page (or any other page), it doesn’t appear in the post selector of the URL input field. Only posts show up.
The other nav link is a dynamic link to the home page.
For test purposes I selected one of the posts that I can choose from in the post selector. Then the styles apply.
Thank you for providing this information,
Currently, the current page styling will only apply for links selected through the URL input field.
Hence why it wasn’t applying on your end.
We do plan to extend the current page styling to custom and dynamic links.
So please bear with us in the meantime.
Could you possibly confirm this is the same case,
Thank you in advance.
i added the link via cwicly block inspector, then the link icon there then add the link via static url option.
and what do you mean by links selected through the URL input field
Sorry for the confusion,
By URL input field, I mean are you entering a custom link, or selecting a link from the suggestions?
This is what I mean by suggestions:
Please don’t hesitate to let me know if you have any more questions.
Custom URLs’ state should now be supported in
If you still encounter trouble, please let us know by replying to this thread.
It works for the static links. The dynamic homepage link doesn’t change. If I change it to a static homepage link, the current styles get applied.
I found the reason why only posts and no pages were shown in the url input field: I used a php code snippet to limit the wordpress search to posts. This also affected the URL search in the backend.
@Louis, since you have been kind enough to include custom URLs, how about this request :
When visiting any page, if that page is in the menu it is set to the current page.
Usually with post types, a desirable behaviour to ensure users know where they are within the site is the following:
Viewing any post page will result in the post type archive page menu item being set to current (as if the post page was a child of the archive page menu item).
In any cases where this didn’t happen automatically, using the standard WordPress menu we could use filters to ensure the…