Get parent page ID (or slug)
-
Hello, I’ve read that it is possible to retrieve the link to the parent page with
echo '<a href="'.get_permalink($post->post_parent).'">'.get_the_title($post->post_parent).'</a>';
But is it possible to retrive the parent page ID or slug ?
Thanks !
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get parent page ID (or slug)’ is closed to new replies.