Post delete but goes to page saying it can’t delete
-
add_action('wp_trash_post', 'force_trash'); function force_trash($postid) { wp_delete_post($postid); }
I am using this code to delete a post when the trash button is pressed. I have to run this because I have to force everything to be published and it fires every time a post is update with ‘wp_insert_post_data’. My problem is every time I hit the trash button it goes to a page that says “Error in moving the item to Trash.” But it still deletes the post.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Post delete but goes to page saying it can’t delete’ is closed to new replies.