我有以下代码-我正在尝试获取ID为4117的页面的最后一个子页面。以下是我目前的代码:
// WP_Query arguments
$args = array(
\'post_parent\' => \'4117\',
\'posts_per_page\' => \'1\',
\'order\' => \'DESC\',
\'orderby\' => \'menu_order\',
);
// The Query
$query = new WP_Query( $args );
$posts = $query->posts;
foreach($posts as $post) {
echo $post->post_title;
}
但它似乎没有任何作用。关于我的问题有什么线索吗?