Title: Set folder with wp_insert_post
Last modified: May 20, 2020

---

# Set folder with wp_insert_post

 *  Resolved [elloagent](https://wordpress.org/support/users/elloagent/)
 * (@elloagent)
 * [6 years ago](https://wordpress.org/support/topic/set-folder-with-wp_insert_post/)
 * I create pages programmatically and need to assign them to a folder during the
   creation phase. Is there a way to assign a folder during the wp_insert_post call?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Gal Dubinski](https://wordpress.org/support/users/galdub/)
 * (@galdub)
 * [6 years ago](https://wordpress.org/support/topic/set-folder-with-wp_insert_post/#post-12892605)
 * Should be possible 🙂
    Please email me at [gal@premio.io](https://wordpress.org/support/topic/set-folder-with-wp_insert_post/gal@premio.io?output_format=md)
   and I’ll do my best to help you out with this

Viewing 1 replies (of 1 total)

The topic ‘Set folder with wp_insert_post’ is closed to new replies.

 * ![](https://ps.w.org/folders/assets/icon-256x256.gif?rev=2893439)
 * [Folders - Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager](https://wordpress.org/plugins/folders/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/folders/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/folders/)
 * [Active Topics](https://wordpress.org/support/plugin/folders/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/folders/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/folders/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Gal Dubinski](https://wordpress.org/support/users/galdub/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/set-folder-with-wp_insert_post/#post-12892605)
 * Status: resolved