My goal is to allow users to delete posts they own from the front end. I have an API that returns some JSON along with a link to delete their post.
$delLink = wp_nonce_url( site_url() . "/wp-admin/post.php?action=trash&post=" . $post->ID, 'trash-' . $post->post_type . '_' . $post->ID);
This does return a url with a nonce
If I click this link it brings me to the 'posts' section of my admin panel without deleting the custom post in question.
But if I compare that to the link in my admin panel, the URL should be
What am I doing wrong here?