Support » Plugin: Post Expirator » Post expire by category remove

  • Hi! I just want to make sure that I understand how this is supposed to work. I’m assuming that selecting this and then selecting a category means that category is removed on expiration. I have two categories assigned to a post and I want it to remove one of the categories when it expires and it does not seem to be working that way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had the same issue, but only if the original post had 1 category and I was removing that category. If the post had 2+ categories and I was removing 1 of them, then it worked. The way I fixed it was to edit post-expirator.php on line 758 and change:
    if (wp_update_post(array('ID' => $id, 'post_category' => $merged)) == 0) {
    to:
    if (wp_set_post_categories($id, $merged, false)) {

    Sorry, the code should be changed to:
    if (wp_set_post_categories($id, $merged, false) == false) {

    Otherwise the email and/or debugging will not work correctly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post expire by category remove’ is closed to new replies.