How can I retrieve a list of a Wordpress page's sibling pages?
问题 I am trying to create a list of sibling pages (not posts) in WordPress to populate a page's sidebar. The code I've written successfully returns a page's parent's title. <?php $parent_title = get_the_title($post->post_parent); echo $parent_title; ?> As I understand it, you need a page's id (rather than title) to retrieve a page's siblings (via wp_list_pages). How can I get the page's parent's id? Alternate approaches are welcome. The goal is to list a page's siblings, not necessarily just