请帮助我:我需要获取当前页面的父级,换句话说:获取$direct\\u parent的父级。谢谢
<?php
global $post;
$direct_parent = $post->post_parent;
$parent = $direct_parent->post_parent;
wp_list_pages( array(
\'child_of\' => $parent,
\'title_li\' => false,
\'depth\' => 1
) );
?>
此代码无效(