link to parent's parent
-
Hello,
I am using the following code to create a link to the parent of a page.<?php $permalink = get_permalink($post->post_parent); ?> <a href="<?php echo $permalink; ?>" style="text-decoration: none;" class="bauhaus size20px colororange">?<?php $parent_title = get_the_title($post->post_parent); echo $parent_title; ?></a>
I’m wondering what I should modify or how I should go about making it display the parent of that parent.
iow, my page structure is like this:
Page 1
-Page 1A
–Page 1A-aWhen I am on Page 1A-a I would like to make a link to page 1.
Thanks in advance for your help.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘link to parent's parent’ is closed to new replies.