WordPress.org

Ready to get started?Download WordPress

Forums

Conditional tags? (1 post)

  1. bigshift
    Member
    Posted 3 years ago #

    I am working on a site that has navigation a couple layers deep, with parent pages, etc.

    I am using
    <?php if (is_page('lifestyle')) echo('class="left-current" '); ?>

    which works well enough, but, when I click on one of the child pages, in this instance, lifestyle >> meet others... I lose the current style (obviously because I am going from the lifestyle page to the meet others... Is there a conditional tag that will allow me to keep the parent nav item highlighted while in a child page?

    Thanks, appreciate any help.

Topic Closed

This topic has been closed to new replies.

About this Topic