• I am a little mixed up with the codes and Css, please help me.

    I have buddypress installed blog thats why instead of wordpress navigation code I use Hard code navigation that is manually created.
    I have given the following code to each page to give a active page styling to the page which is being opened right now.

    <li class="<?php if (is_page('Contact')) { echo "selected"; }?>">
    (In this, if the page opened is contact than the selected class styling will be applied to this link)

    Everything worked fine and I even added 2 different list for the main and the child navigation (Under each other) and put the code so that even if we are on a child page then also the other child pages of that parent page appears in the child menu.

    But, my problem started when I wished to highlight the parent link too when the child page is being viewed.

    I have found many answer to it by giving styling for .current-page-ansetor (something like that) but that will not work for me as only the child navigation is build automatically and the Main Parent navigation is build manually as stated above.

    So I need your help.

    Can you tell me how can I retrieve more than 1 page in the code I mentioned above so that
    <li class="<?php if (is_page('Contact')... with contact page I can add it its child page so when the visitor is on the child page then also the parent link is highlighted.

    I am sorry for making things so confusing but I had to tell everything for getting quick reply

    Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Retrieving multiple pages with one command for highlighting current page’ is closed to new replies.