Forums

How to highlight customs nav bttn of current page (4 posts)

  1. vihegay
    Member
    Posted 4 months ago #

    Hello,

    Happy New Year for all of you. Mine starts well, i just need some help... :)

    I use Twenty Eleven theme. I added four additional icons into the header as a seconday navigation bar. I would like to know how to highlight the icon with a background when it is on its (current) page...

    I added the icons into the header :

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The current_page_item does not work... i guess i should identify the current page with an id or something like that, unfortunately i could not use any description i found on the web for my case... if someone could give me the detailed answer...

    My web site : http://www.vihegay.com (do not discriminate pls :)), the four icons are positioned on the top right.

    Thanks,
    Igor

  2. vihegay
    Member
    Posted 4 months ago #

    I do not understand... i put the codes as the rules requires... i try again...

    Hello,

    Happy New Year for all of you. Mine starts well, i just need some help... :)

    I use Twenty Eleven theme. I added four additional icons into the header as a seconday navigation bar. I would like to know how to highlight the icon with a background when it is on its (current) page...

    I added the icons into the header :

    <div id="header_icons">
    <ul>
    <li><a class="addspeech" href="http://www.vihegay.com/contact/" target="_self" title="Contact"><img src="http://www.vihegay.com/wp-content/themes/twentyeleven/images/icons/i4s.png" /></a></li>
    <li><a class="addspeech" href="http://www.vihegay.com/cgu/" target="_self" title="Conditions générales d utilisation (CGU)"><img src="http://www.vihegay.com/wp-content/themes/twentyeleven/images/icons/i12s.png" /></a></li>
    <li><a class="addspeech" href="http://www.vihegay.com/register/" target="_self" title="Inscription"><img src="http://www.vihegay.com/wp-content/themes/twentyeleven/images/icons/i1s.png"></a></li>
    <li><a class="addspeech" href="http://www.vihegay.com/" target="_self" title="Accueil"><img src="http://www.vihegay.com/wp-content/themes/twentyeleven/images/icons/i0s.png" /></a></li>
    </ul>
    </div>

    My css codes for it :

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

    The current_page_item does not work... i guess i should identify the current page with a "li id" or something like that, unfortunately i could not use any description i found on the web for my case... if someone could give me the detailed answer...

    My web site : http://www.vihegay.com (do not discriminate pls :)), the four icons are positioned on the top right.

    Thanks,
    Igor

  3. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your changes.

  4. vihegay
    Member
    Posted 4 months ago #

    Thanks for your advise, however i had another question, it did not help me so far...

    Concerning the child theme, it is too late, i already changed the main theme from the beginning when i did not know anything about this subject, when i will find some time for making one, i will do it, i promis :)

    [No bumping, thank you.]

Reply

You must log in to post.

About this Topic