I've the next link which enables a writer to remove a publish on my small site however i require it to redirect towards the webpage later on because right now it tries to accept user towards the publish itself which of cause will throw a 404 because it no more is available (not so user-friendly)

This is actually the code: <p id="delete"><a title="Delete your Favor?" href="<?php echo get_delete_post_link( $post->ID ); ?>">Delete your Favor?</a></p>

How do i modify it to redirect towards the home page? Thanks.

Based on the Wordpress 3..4 source code (wordpress-admin/publish.php, line 223), dealing with that link calls the wordpress_trash_publish function.

That function finishes by triggering a trashed_publish action (wordpress-includes/publish.php line 1838).

You are able to connect your personal handler towards the trashed_publish action (with add_action) and perform a wordpress_redirect.

Simplest method of doing this: Your theme must have a functions.php file.

Add this into it:

function my_trashed_post_handler($post_id)
    wp_redirect( get_option('siteurl') );