Title: php inside php
Last modified: August 18, 2016

---

# php inside php

 *  [sparrows](https://wordpress.org/support/users/sparrows/)
 * (@sparrows)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/php-inside-php/)
 * Hi all 🙂
 * Is it possible to use a php command inside another?
    I’d like to have a list 
   of the child Pages on the Parent Page, and I tried all of these (and some more
   combinations) on the Page template: ` <?php wp_list_pages('child_of=the_ID();');?
   > <?php wp_list_pages('child_of=<?php the_ID(); ?>'); ?> <?php wp_list_pages('
   child_of=the_ID'); ?>   No list of pages shows up at all. When I manually enter
   the page ID for a Page, it does work though.
 * Does PHP not allow this kind of nesting? If not, is there another way to get 
   the page ID in the tag?
 * Many thanx,
    John.

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

 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/php-inside-php/#post-288388)
 * No you can’t, shouldn’t and wouldn’t – what is it you are trying to acomplish?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/php-inside-php/#post-288389)
 * I am not a PHP guru but PHP doesn’t work with that kind of “nested” tags. That’s
   for sure, the issue came up several times in the forum.
    There might be a solution
   given somewhere in the jungle of the forum, so you may want to try searching.

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

The topic ‘php inside php’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/php-inside-php/#post-288389)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
