我目前正在使用以下函数列出页面的子级,但是该函数递归查找子级的子级,我只想列出$post->post_parent.
wp_list_pages(array(\'child_of\' => $post->post_parent,\'exclude\' => $post->ID))
 有人知道怎么做吗?
 
                    最合适的回答,由SO网友:Rutwick Gangurde 整理而成
                    尝试以下操作:
wp_list_pages(array(\'child_of\' => $post->post_parent,\'exclude\' => $post->ID, \'depth\' => 1))
 阅读
the codex 了解更多详细信息。