Support » Themes and Templates » Display single page or child pages from one template file
6 years ago
I was looking to use a single-posttype.php to display a single page or a list of Child pages. After a couple hours of testing I came up with the following code:
[Code moderated as per the Forum Rules. Please use the pastebin]
Is there a more efficient way of writing this code?
I recently modified it to work when a Post has no Child pages.
Can this be streamlined?