[Resolved] Background Colours Of Menus

Home Forums Support [Resolved] Background Colours Of Menus

Home Forums Support Background Colours Of Menus

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #273989
    Mary Pearson

    Hi Tom,

    On my website at https://christiangays.com/ you will note that I have a primary menu with links to sub-domains (CAPITAL LETTERS). Secondary menu is different on each sub-domain.

    When I click on a sub-domain in the primary menu, the background colour goes tan. (good)
    When I click on a menu item in the secondary menu, the background colour goes tan (good), and the background colour of the sub-domain in the primary menu goes back white (not selected) (not good).

    I would like my members to know which parts of the site they are on, so I’m wondering if there is any way to keep the background colour of the primary menu tan, even when they click on an item in the secondary menu.

    Is this possible, and if so, how?
    Thanks!

    #274042
    Tom
    Lead Developer
    Lead Developer

    The tan color in your case is the current background color. So in order for any one menu item to be tan, WordPress needs to see some sort of relationship between the current page and the menu item. Whether it’s a parent or child page, the current page etc..

    #274044
    Mary Pearson

    So do you think it’s possible?

    #274046
    Tom
    Lead Developer
    Lead Developer

    Only if there’s a relationship between the page and the menu item you want to be tan.

    The other alternative is to use javascript to give that menu item the current-menu-item class when you’re on a specific page. That would be pretty complicated though, especially if you’re not familiar with javascript.

    #274047
    Mary Pearson

    Thank you. No I know that I can’t do it but I might be able to pay a coder to do it for me if you think it’s possible.

    Thanks Tom!

    #274048
    Tom
    Lead Developer
    Lead Developer

    No problem – good luck! ๐Ÿ™‚

    #285880
    Mary Pearson

    I thought you might like to know that my coder was able to complete this task for me.

    My secondary links are now connected to primary links, so that when a person clicks on a link in the secondary menu, the primary menu also changes colour.

    I’m a happy camper!

    #285950
    Tom
    Lead Developer
    Lead Developer

    Perfect ๐Ÿ™‚

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.