WordPress.org

Ready to get started?Download WordPress

Forums

Declare CSS class to active link/page - HOW? (5 posts)

  1. ultraali
    Member
    Posted 1 year ago #

    Hello
    How can I give my active link/page a unique CSS class?
    I use this code for show menu:
    <div id="main-header">
    <div id="menu-top">
    <?php wp_nav_menu( array( 'theme_location' => 'blog-menu' )); ?>
    </div>
    </div>

    Thanks

    [bump moderated]

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

  3. ultraali
    Member
    Posted 1 year ago #

    I see this link
    use .current-menu-item for current page but not happen
    please more help for this issue
    Thanks

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    as the menu items show as links, you might need to style:
    .current-menu-item a { ... }

    if your new styles are applied will also depend on how specific the other menu items are styled.

    please post a link to your site; formatting problems cannot otherwise be discussed properly.

  5. ultraali
    Member
    Posted 1 year ago #

    i use .current-menu-item a { ... } but not happen
    this site is localhost pc
    i move site to server and send link for you
    Very Very thank you

Topic Closed

This topic has been closed to new replies.

About this Topic