• I’ve built a navigation in the sidebar from Pages. What would be the most proper way to “make navigation buttons stick” anyway somehow indicate the current location?

    I found this post here, but I cant fully understand it.
    I’ve done it before in my purely CSS and HTML page. Something like this.

    So, is there some easy way to this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • You don’t say how you built the navigation …

    If you use wp_list_pages, it will wrap the current page’s list item like so:
    <li class="page_item current_page_item"><a ...>Page X</a></li>
    and you can use CSS to define the style associated with current_page_item.

    See wp_list_pages for additional information.

    Thread Starter hilj

    (@hilj)

    That was surprisingly easy.

    But one thing there is. I would like the current link just to chance color to a darker gray when active, I can’t seem to do that.

    This doesn’t work:
    .current_page_item {color: #444;}

    But this does work:
    .current_page_item {background: #444;}

    Is it something to with this coloring:
    #sidebar a {color:#aaa;}

    somehow over ruling the first mentioned {color: #444;} coloring?

    thank you

    Probably. I’m glad you’ve got it solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Navigation current state indication?’ is closed to new replies.