Dropdown Menu Widget
[resolved] Changing the color of the link of the parent page you are in (5 posts)

  1. jabadell
    Posted 3 years ago #

    Hey there,

    Is there a way to change the color of the page link you are in?

    Kind of how wordpress works with .current_page_item?

    Let me know.



  2. vanrithysok
    Posted 3 years ago #

    Looking for the same solution, too. How to add something like .current if we are a specific page/posts!

  3. vanrithysok
    Posted 3 years ago #

    I found it!
    just use the li.current-menu-item that's it!

  4. kthms
    Posted 3 years ago #

    That's not working for me...am I missing something?

  5. Metin Saylan
    Plugin Author

    Posted 3 years ago #

    That option changes on every menu type.
    Because I am not generating menus, wordpress does.

    It is generally for pages menu: li.current_page_item
    for categories menu: li.current-cat
    for custom menus: li.current-menu-item

    I am using this code to change link colors on Web2.0 theme:

    /** Current menu item */
    li.current-cat>a, li.current_page_item>a, li.current-menu-item>a,
    li.current-cat>a:link, li.current_page_item>a:link, li.current-menu-item>a:link,
    li.current-cat>a:visited, li.current_page_item>a:visited, li.current-menu-item>a:visited{ color: #444; font-weight: normal; }
    /** Ancestor */
    li.current_page_ancestor>a,li.current_page_ancestor>a:visited, li.current_page_ancestor>a:link { color: #444; font-weight: normal; }
    li.current-menu-ancestor>a,li.current-menu-ancestor>a:visited, li.current-menu-ancestor>a:link { color: #444; font-weight: normal; }

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Dropdown Menu Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.