Last active
March 31, 2016 00:41
-
-
Save jarednova/b8cd20bbd534483a9a0dff6e39eee237 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function MyChildPostClass extends TimberPost { | |
function special_children() { | |
/* modify the query on line 7 as you need */ | |
$children = get_children('post_parent=' . $this->ID . '&post_type=post&numberposts=-1&orderby=menu_order title&order=ASC&post_status=publish'); | |
foreach ( $children as &$child ) { | |
$child = new $childPostClass($child->ID); | |
} | |
$children = array_values($children); | |
return $children; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment