WordPress.org

Ready to get started?Download WordPress

Forums

List page with parent css class (2 posts)

  1. modhack
    Member
    Posted 2 years ago #

    Hello,

    I would like to design this sub navi page automaticaly
    Currently i'm using a class "subat" if the page is (ID)

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I would like to use the list page condition and also apply the class if the page is current

    list child page of parent 'about', if page = current then class="subat"

    Any idea how to do this ?

  2. modhack
    Member
    Posted 2 years ago #

    Here the code

    `<li id="<?php if (is_page(6)) echo "subat"; ?>">
    <a href="/about/" title="A Propos">A propos</a>
    </li>
    <li id="<?php if (is_page(27)) echo "subat"; ?>">
    <a href="/about/support/" title="Support">Fonctionnalit├ęs</a>
    </li>`

Topic Closed

This topic has been closed to new replies.

About this Topic