Delete post by giving its link June 13, 2022 by Tarik Billa I found the solution to my problem: wp_delete_post(url_to_postid("url"));