Title: Parent ID Tag
Last modified: August 19, 2016

---

# Parent ID Tag

 *  Resolved [saloonstudios](https://wordpress.org/support/users/saloonstudios/)
 * (@saloonstudios)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/parent-id-tag/)
 * I searched and found “Snippet 2” on this page:
    [http://codex.wordpress.org/Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)
   I’ve added that function to my functions.php, but when I add several variations
   of
 * > <?php is_subpage(); echo $parentID; ?>
 *  to my page.php, nothing is returned. I’m sure I’m just not using the correct
   syntax. I know this is a child page and I’m trying to return the parent page 
   ID. I can’t find any more info on this unless I’ve just blatantly overlooked 
   it. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [saloonstudios](https://wordpress.org/support/users/saloonstudios/)
 * (@saloonstudios)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/parent-id-tag/#post-1363270)
 * I guess more toward the end result; I’d like to also be able to return the permalink
   of the parent page.
 *  Thread Starter [saloonstudios](https://wordpress.org/support/users/saloonstudios/)
 * (@saloonstudios)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/parent-id-tag/#post-1363276)
 * After more diligent searching I found my answer.
    Sorry for the false alarm. 
   Working solution was here: [http://wordpress.org/support/topic/303390?replies=2](http://wordpress.org/support/topic/303390?replies=2)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Parent ID Tag’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [saloonstudios](https://wordpress.org/support/users/saloonstudios/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/parent-id-tag/#post-1363276)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
