Query posts(CPT, pages , hierarchical) by Ancestor ID

so i have a custom post type with hierarchical structure. Looks like this:

top level 1
   - child 
      -- grand child
      -- grand child
   - child
      -- grand child
top level 2
   - child 
      -- grand child
      -- grand child
   - child
      -- grand child
top level 3

and so on.

I need a query with top level id as a base and query through all child and grand child pages of that top level page?

I know ther is post_parent arg, but it wont query grand childs... I know I can second query childs for grand childs... but i dont want that. I need 1 query with all the other parameters, and with proper pagination count. any ways to achive that?

thanks

Topic wp-parse-args wp-query Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.