Support » Fixing WordPress » Highlight Home menu

  • kristel_ttm

    (@kristel_ttm)


    It’s a subject that has been already mentioned many times but despite me reading all concerned posts I still was not able to make this work.
    I’m quite a beginner though.

    Thanks to a tutorial on the net, all my menu buttons are now highlighted for the current page except for ‘Home’. I understand I need to add a ” current page item class ” to <php if(is_home)()?> somewhere. But where ? Which template ? I can’t find anything in header.php.

    I am using the twenty ten theme and here is my site: http://www.djpromo.nl/wordpress

    Thank you in advance !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator cubecolour

    (@numeeja)

    In the style.css find where your style for the current link is defined

    #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 {
    		background: #333;color: #fff;}

    Add this line at the top:

    .home #access ul li.menu-item-home > a,

    so it looks like this:

    .home #access ul li.menu-item-home > a,
    #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 {
    		background: #333;color: #fff;}

    kristel_ttm

    (@kristel_ttm)

    Damn, I still have a lot to learn ! I can’t believe it was that simple. I thought I needed to modify a template. Thank you VERY much cubcolour !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Highlight Home menu’ is closed to new replies.