• ninja-master-jimmy-wong-fu

    (@ninja-master-jimmy-wong-fu)


    For example:

    <li<?php if (is_page('12')) {echo ' class="current_page_item"'; }?>><a href="index.php?page_id=12" id="history"></a></li>

    Simple enough. If this is page 12 the class current_page_item is applied.

    I understand how to apply a class to a category but how would I modify the code to apply the class to a page and all of its child pages?

    Rock on

    J Fu

  • The topic ‘How do I apply a specific class to a PAGE and all of its CHILD PAGES’ is closed to new replies.