WordPress.org

Forums

Highlight Current Menu Item: Home Not Working (2 posts)

  1. thelumberjack
    Member
    Posted 4 years ago #

    Hello,

    I'm currently building a theme and am having a small problem with wp_nav_menu. Firstly, here is my template code:

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    And here is my CSS that controls the currently active menu item/page/post:

    #access ul li.current_page_item > a,
    #access ul li.current-menu-ancestor > a,
    #access ul li.current-menu-item > a,
    #access ul li.current-menu-parent > a {
        color: #FFF;
        background: #F45300;
        border: 1px solid #C84502;
        -moz-border-radius: 7px;
        -webkit-border-radius: 7px;
        border-radius: 7px;
        -moz-box-shadow:inset 0 0 4px #C64503;
        -webkit-box-shadow:inset 0 0 4px #C64503;
        box-shadow:inset 0 0 4px #C64503;
    }

    Now this is working perfectky for every single page/post except for my homepage. Does anybody know why? I am using a static homepage by the way.

    Thanks!

  2. Rindy Portfolio
    Member
    Posted 4 years ago #

    Hey if you are still looking for this answer check here

Topic Closed

This topic has been closed to new replies.

About this Topic