It appears that I can only use an ID for the param post_parent whether in WP_Query or get_children
Is there a way to query for children via postnames which are more readable.
Try using the get_page_by_path() function (Codex ref).
So, something like:
$mypage = get_page_by_path( 'page-slug' );
$mypageid = ( $mypage ? $mypage->ID : '0' );
Then, the post_parent argument becomes:
'post_parent' => $mypageid
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
By posting your answer, you agree to the
terms of service.
2 years ago