In my navigation bar there is a link which takes you to the page. And I added two sub items which are custom links. In custom link URL box i put http://localhost/wp/wordpress/test/#1 and in page it's self i put

<a name="1"><h2>Lorem Ipsum</h2></a>

And anchor works perfectly but when im in the page it's self and press on menu to get drop-down list with anchors. It has changed the color to the orange because its in a current page. It can be fixed if you in custom link URL box put just #1 (as you can see in image below anchor 2 has only #2. But then ofcourse you cant get to anchored page from different page.


What i want is to have functionality of anchor 1 and style of anchor 2. As far as i know its a CSS problem. But i dont know how to solve it.

I am using Education Hub By WEN Themes

All help is appreciated!

1 Answer 1


Sounds like you need to properly target your HTML elements. It is also not clear from your explanation what needs to happen. More code would definitely help explain what you need. Please improve the quality of your question.

With that said, I'll give it a shot:

anchor 1 has different styling because you're hovering the menu while on anchor 1's page. Using dev tools (Chrome etc), it should be clear what classes (or targeted HTML elements) are added to show the current page when you hover the menu. You can then style those classes differently.

I'll also note that if you targeted specific HTML or CSS classes then you shouldn't expect elements NOT targeted to have those styles.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.