<?php if( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
set_query_var( 'commentid1', $_POST['commentid'] );
wp_delete_comment( get_query_var( 'commentid1'), true );
header("Location:yonlendirmekistediginizlink");
}
?>
<form class="delete-comment" action="" method="post">
<input type="hidden" name="commentid" value="<?php comment_ID() ?>" />
<input type="submit" value="Delete" title="Delete" class="btn" />
</form>
Maalesef çalışmadı hocam. Şu kodu yerleştirebilsem tam istediğim şekilde olacak aslında;
$url = 'http://example.com';wp_redirect($url);exit();