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?
- The topic ‘php inside php’ is closed to new replies.