Delete WordPress post from post_title perspective
-
Hello guys.
Perhaps you can help me. I got a script that needs to delete a WordPress post when the title is the same as this value.
As wp_delete_post($id) works with the ID. How to…
$subject = Outside title
Now i want WordPress to delete the post what has “Outside title” as title.
How do i do this?
I tried:
$args = array(“post_title” => “$subject”);
$posts = get_posts($args);print_r ($posts);
No result so far. Thank you very much in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Delete WordPress post from post_title perspective’ is closed to new replies.