WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] active state of custom menu item (10 posts)

  1. Isabel F
    Member
    Posted 1 year ago #

    How can I rewrite this css into correct wordpress style?

    #menuitems ul li.menu-item-type-custom a:active{
    color:#333;
    display:block;}

    For link - hover - visited it works well.
    Thanks!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Depends on your theme and site - no way to know without seeing it.

  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    What is the issue?

  4. Isabel F
    Member
    Posted 1 year ago #

    This is the link (site is not finished yet):http://www.academiekuma.be/informatie/kuma-zegt-u/
    I made a custom link on http://www.academiekuma.be/info/kuma-zegt-u with INFO as parent item. And now I want the parent item to be active while the sub-item is also active.
    Thanks!

  5. Ravinder Kumar
    Member
    Posted 1 year ago #

    Maybe this can help you
    Wordpress give default class to selected menu item

    .current-menu-item{
    /*give your styling here to active menu item, any where after your menu styling*/
    }

  6. Isabel F
    Member
    Posted 1 year ago #

    Thanks, but it doesn't work.
    I think the problem is due to the custom link I made:
    url:http://www.academiekuma.be/info/kuma-zegt-u and navigation label: INFO
    Thanks

  7. ronangelo
    Member
    Posted 1 year ago #

    The ".current-menu-item" class is not showing. That IS weird.

    The page doesn't exist. Try changing the custom link from
    http://www.academiekuma.be/info/kuma-zegt-u
    to this
    http://www.academiekuma.be/informatie/kuma-zegt-u/

  8. Isabel F
    Member
    Posted 1 year ago #

    I've tried this, but it still doesn't work.

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    Are you building your own theme? If so, have you used the wp_nav_menu function to built your navigation menu?

  10. Isabel F
    Member
    Posted 1 year ago #

    I used the book by Ravensbergen. It is slightly different.
    I deleted the custom link, because it seems to difficult...
    Thanks for the replies!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.