What does that mean? What are you trying to accomplish?
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.ww.wp.xz.cn/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
(@tceg)
Hi @bcworkz @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.
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
(@tceg)
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.
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.