Title: How can i write this code?
Last modified: August 20, 2016

---

# How can i write this code?

 *  [celticks](https://wordpress.org/support/users/celticks/)
 * (@celticks)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/how-can-i-write-this-code/)
 * I have this code, which makes all pages that are children of pageid 1639 display
   a certain template. I want to change it so it will work for grandchildren for
   for pageid 1639 as well.
 * _[ Moderator Note: Please post code or markup snippets between backticks or use
   the code button. ]_
 *     ```
       <?php if (is_page(1639) || $post->post_parent=="1639"): ?>
       <?php get_template_part( 'loop', 'about' ); ?>
       ```
   
 * Thanks in advance
 * _[ Please do not bump, that’s [not permitted here](http://codex.wordpress.org/Forum_Welcome#No_Bumping).]_

The topic ‘How can i write this code?’ is closed to new replies.

## Tags

 * [bumping](https://wordpress.org/support/topic-tag/bumping/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [celticks](https://wordpress.org/support/users/celticks/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/how-can-i-write-this-code/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
