Title: Create a tree structure programatically
Last modified: April 21, 2021

---

# Create a tree structure programatically

 *  [sanaconeltantra](https://wordpress.org/support/users/sanaconeltantra/)
 * (@sanaconeltantra)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/create-a-tree-structure-programatically/)
 * Hello,
    Great plugin but I need to create the tree structure for hundreds of 
   pages. I know the parent id for each child page. Do you have some php functions
   or sql queries I could use to recreate the tree? Thanks!

The topic ‘Create a tree structure programatically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cms-tree-page-view_f1f1f1.svg)
 * [CMS Tree Page View](https://wordpress.org/plugins/cms-tree-page-view/)
 * [Support Threads](https://wordpress.org/support/plugin/cms-tree-page-view/)
 * [Active Topics](https://wordpress.org/support/plugin/cms-tree-page-view/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cms-tree-page-view/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cms-tree-page-view/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [sanaconeltantra](https://wordpress.org/support/users/sanaconeltantra/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/create-a-tree-structure-programatically/)
 * Status: not resolved