WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. jabadell
    Member
    Posted 1 year 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.

    Thanks!

    http://wordpress.org/extend/plugins/dropdown-menu-widget/

  2. vanrithysok
    Member
    Posted 1 year ago #

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

  3. vanrithysok
    Member
    Posted 1 year ago #

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

  4. kthms
    Member
    Posted 1 year ago #

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

  5. Metin Saylan
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.