Title: Getting page link
Last modified: August 20, 2016

---

# Getting page link

 *  Resolved [itskdawg](https://wordpress.org/support/users/itskdawg/)
 * (@itskdawg)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/getting-page-link/)
 * Hi guys
 * How can I have the following
 *     ```
       <h2 class="sidenav">
       <?php
       $parent_title = get_the_title($post->post_parent);
       echo $parent_title;
       ?>
       </h2>
       ```
   
 * To also link to the page, so even if I was on a child page, the parent page would
   be displayed linked**?**
 * Cheers

The topic ‘Getting page link’ is closed to new replies.

## Tags

 * [child](https://wordpress.org/support/topic-tag/child/)
 * [link](https://wordpress.org/support/topic-tag/link/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [title](https://wordpress.org/support/topic-tag/title/)

 * 0 replies
 * 1 participant
 * Last reply from: [itskdawg](https://wordpress.org/support/users/itskdawg/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/getting-page-link/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
