Skip to main content

post_parent returns only the child pages of the page whose ID is given as the value.

post_parent (int) - use page id to return only child pages. Set to 0 to return only top-level entries

To get just a specific page, rather use page_id or pagename or post__in (in conjunction with post_type=page.

I would suggest that you rather make use of get_pages which is specifically there to query pages.

Just a note here, wp_reset_query() is used in conjunction with query_posts. You should use wp_reset_postdata() with WP_Query

--

Here the solution from the comments below:

Polylang creates a new custom parameter "lang". This parameter appears to default to "", which is supposed to return posts with any value. Instead it returns posts with the current page's language value only (hence only children of current page ID = 5). As a fix I now manually loop through the available values for "lang" to get pages with all values for "lang". I'll check with the plugin author if this is a bug or caused by my environment.

post_parent returns only the child pages of the page whose ID is given as the value.

post_parent (int) - use page id to return only child pages. Set to 0 to return only top-level entries

To get just a specific page, rather use page_id or pagename or post__in (in conjunction with post_type=page.

I would suggest that you rather make use of get_pages which is specifically there to query pages.

Just a note here, wp_reset_query() is used in conjunction with query_posts. You should use wp_reset_postdata() with WP_Query

post_parent returns only the child pages of the page whose ID is given as the value.

post_parent (int) - use page id to return only child pages. Set to 0 to return only top-level entries

To get just a specific page, rather use page_id or pagename or post__in (in conjunction with post_type=page.

I would suggest that you rather make use of get_pages which is specifically there to query pages.

Just a note here, wp_reset_query() is used in conjunction with query_posts. You should use wp_reset_postdata() with WP_Query

--

Here the solution from the comments below:

Polylang creates a new custom parameter "lang". This parameter appears to default to "", which is supposed to return posts with any value. Instead it returns posts with the current page's language value only (hence only children of current page ID = 5). As a fix I now manually loop through the available values for "lang" to get pages with all values for "lang". I'll check with the plugin author if this is a bug or caused by my environment.

Source Link
Pieter Goosen
  • 55.4k
  • 23
  • 115
  • 209

post_parent returns only the child pages of the page whose ID is given as the value.

post_parent (int) - use page id to return only child pages. Set to 0 to return only top-level entries

To get just a specific page, rather use page_id or pagename or post__in (in conjunction with post_type=page.

I would suggest that you rather make use of get_pages which is specifically there to query pages.

Just a note here, wp_reset_query() is used in conjunction with query_posts. You should use wp_reset_postdata() with WP_Query