Support » Plugins » Hacks » Adding a Nav menu to all child pages

Viewing 1 replies (of 1 total)
  • Hi Lizzy,

    I tried using code from that thread and had no luck either. I found code that did work, though!

    If you want to call the parent AND child pages:

    (is_page(pageid) || $post->post_parent==”pageid”)

    Example:

    <?php if (is_page(‘contact’) || $post->post_parent==”2″)) { ?>

    Or if you just want to call the only the child pages:

    ($post->post_parent==”pageid”)

    Example:

    <?php if ($post->post_parent==”2″)) { ?>

    Hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Adding a Nav menu to all child pages’ is closed to new replies.