WordPress.org

Support

Support » Themes and Templates » Alternate background colors for child page list

Alternate background colors for child page list

  • Hey guys, I’ve found some solutions to problems similar to this but I can’t seem to get to work the way I need it too.

    What I’m trying to do is display child pages of a parent as a list and apply alternate an alternate background color to every other list item <li>

    All I’ve got so far is:
    <ol><?php wp_list_pages('title_li=&child_of=1118&sort_column=menu_order'); ?></ol>
    This lists the child pages from a specified parent but I need to add some php to apply perhaps a different class to every other <li> so that I can apply an alternate background color in css.

    Any help is much appreciated.
    Thanks,
    Chris

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Alternate background colors for child page list’ is closed to new replies.
Skip to toolbar