How to get Page Parent ID (4 posts)

  1. gbouchar
    Posted 9 years ago #

    I can find a page parent name by doing this:


    $toto = get_the_title($post->post_parent);
    if(get_the_title($post->post_parent) != the_title(' ' , ' ',false))
    echo $toto;


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

  2. yuh
    Posted 9 years ago #

    isnt the id shown in the adressbar? this is normaly the id, the permalink too - but i think you mean something else...

  3. moody
    Posted 9 years ago #

    I'm trying to find out the same thing. I just found this post after posting my is_subpage() function post.

    I've spent a few days trying to come up with a solution by reverse engineering a few different plugins, e.g.Breadcrumb Nav XT.

    No success so far.
    Have you or anyone figured this out?

  4. Simon Blackbourn
    Posted 9 years ago #

    The function posted by freebies ("finally i got it") in thread 55766 works for me.

Topic Closed

This topic has been closed to new replies.

About this Topic