Title: Replace category
Last modified: December 9, 2016

---

# Replace category

 *  [sroskylos](https://wordpress.org/support/users/sroskylo1/)
 * (@sroskylo1)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/replace-category/)
 * I am trying to make the following code to work and from “draft” to change it 
   to specific category replace. Any help how its gonna do it?
 * // Schedule/Update Expiration
    $opts[‘expireType’] = ‘category’; $opts[‘id’] 
   = $id;
 *  _scheduleExpiratorEvent($id,$ts,$opts);
    } add_action( ‘save_post’, ‘acf_set_expiry’,
   10, 3 );
 * until here it works but when i select category doesn’t save it…
 * the code before its
 * // Schedule/Update Expiration
    $opts[‘expireType’] = ‘draft’; $opts[‘id’] = $
   id;
 * Any solution??

The topic ‘Replace category’ 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/)

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 0 replies
 * 1 participant
 * Last reply from: [sroskylos](https://wordpress.org/support/users/sroskylo1/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/replace-category/)
 * Status: not resolved