Title: Programatically create post with expiration settings
Last modified: August 21, 2016

---

# Programatically create post with expiration settings

 *  [MB MB](https://wordpress.org/support/users/mikkelbreum/)
 * (@mikkelbreum)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/programatically-create-post-with-expiration-settings/)
 * I’d like to set expiration time and method when creating a (CPT) post programmatically.
   How should I do this?
 * Does this plugin support custom post types (in the UI as well)?
 * [https://wordpress.org/plugins/post-expirator/](https://wordpress.org/plugins/post-expirator/)

Viewing 1 replies (of 1 total)

 *  [slickorange](https://wordpress.org/support/users/slickorange/)
 * (@slickorange)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/programatically-create-post-with-expiration-settings/#post-4820212)
 * Not exactly what you are asking – but it might help:
 * [http://wordpress.org/support/topic/post-expiry-based-on-custom-field-solution?replies=1#post-5812670](http://wordpress.org/support/topic/post-expiry-based-on-custom-field-solution?replies=1#post-5812670)

Viewing 1 replies (of 1 total)

The topic ‘Programatically create post with expiration settings’ is closed to new
replies.

 * ![](https://ps.w.org/post-expirator/assets/icon-256x256.png?rev=3118683)
 * [Schedule Post Changes With PublishPress Future: Unpublish, Delete, Change Status, Trash, Change Categories](https://wordpress.org/plugins/post-expirator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-expirator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-expirator/)
 * [Active Topics](https://wordpress.org/support/plugin/post-expirator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-expirator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-expirator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [slickorange](https://wordpress.org/support/users/slickorange/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/programatically-create-post-with-expiration-settings/#post-4820212)
 * Status: not resolved