Tried something like this but it didn’t work :(. I’m guessing I am likely getting the id wrong.
// Hook for deleting field
add_action(“delete_post”, “delete_spec”);
// function for above hook
function delete_spec() {
global $post;
$thePostID = $post->ID;
//blalla
}
Should i add that hook as a plugin or in post.php
Let me try to explain it again. When a user deletes a post on edit.php I want to update a field in a different database. The other database has nothing to do with wordpress. The only thing i need to get is the post id of the posts and when the user presses delete update the other database.