0
votes
1answer
486 views

How to get post id of first child of the same post type?

Is there a function that will let me get the post id of the first child (of the same post type, not attachment)? I could always just run a loop via wp_query but that seems like overkill. :/ The goal ...
0
votes
1answer
228 views

How can I build a query that returns all attachments of a page and it's children pages?

I'm using this query to return attachments of a page. $args = array( 'post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment' ); Is there a way to ...