Support » Themes and Templates » How to get Page Parent ID

  • I can find a page parent name by doing this:

    <?php

    $toto = get_the_title($post->post_parent);
    if(get_the_title($post->post_parent) != the_title(‘ ‘ , ‘ ‘,false))
    {
    echo $toto;
    }
    ?>

    BUT

    HOW can i find the ID of this page since i am on the children page when doing my query?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get Page Parent ID’ is closed to new replies.