Title: Delete link in post loop
Last modified: December 10, 2021

---

# Delete link in post loop

 *  [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/)
 * Hi,
 * Is it possible to add a delete link in the post loop?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15151520)
 * What does that mean? What are you trying to accomplish?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15151984)
 * Do you mean a delete link like there’s an “Edit” link after every post? (Theme
   dependent, but commonly done) It’s possible, but it’s not a simple link. Clicking
   would have to invoke some JavaScript. The script could send a DELETE request 
   to the REST API.
    [https://developer.wordpress.org/rest-api/reference/posts/#delete-a-post](https://developer.wordpress.org/rest-api/reference/posts/#delete-a-post)
 * The script would also need to do something to remove the post content from the
   current page.
 *  Thread Starter [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15153574)
 * Hi [@bcworkz](https://wordpress.org/support/users/bcworkz/) [@sterndata](https://wordpress.org/support/users/sterndata/)
 * I mean add a delete link on the front end on the posts page. I have was able 
   to add it to the single page but ideally would like it on posts page after the
   excerpt.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15154144)
 * Whatever code is responsible for the link on a single post template ought to 
   also work on an archive template as long as it’s within the loop. Of course success
   depends on the actual code involved. Some slight modification might be necessary.
 * Assuming deletion is via the REST API, removing the deleted post from the current
   page is another story, but you could accomplish it by simply reloading the entire
   page after deletion.
 *  Thread Starter [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15154428)
 * Yes, I’ve figured out how to delete a post on the single post template my problem
   lies in not being able to add the link within the post loop in the avada theme.
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15155521)
 * I’m sorry, but we cannot help you with that here due to the theme’s commercial
   nature. For one thing we cannot access its source code and you publishing it 
   for our benefit violates their copyright. I recommend seeking assistance through
   the dedicated support channel of the theme’s vendor. Who ever helps you there
   will benefit from seeing the code you use on single pages.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Delete link in post loop’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 6 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/delete-link-in-post-loop/#post-15155521)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
