Delete post from front end
Then call on it in page: <?php echo wp_delete_post_link(); ?>
Insert this into functions
// Delete from Front-End Link
function wp_delete_post_link($link = 'Delete This', $before = '', $after = '', $title="Move this item to the Trash", $cssClass="delete-post") {
global $post;
if ( $post->post_type == 'page' ) {
if ( !current_user_can( 'edit_page' ) )
return;
} else {
if ( !current_user_can( 'edit_post' ) )
return;
}
$delLink = wp_nonce_url( site_url() . "/wp-admin/post.php?action=trash&post=" . $post->ID, 'trash-' . $post->post_type . '_' . $post->ID);
$link = '<a class="' . $cssClass . '" href="' . $delLink . '" onclick="javascript:if(!confirm('Are you sure you want to move this item to trash?')) return false;" title="'.$title.'" />'.$link."</a>";
return $before . $link . $after;
}