Delete Post from the main page
Say you need to delete a bunch of WordPress post. Doing it the usual way, you’d need to go into the dashboard, go to Manage Posts, then delete them, waiting for it to refresh. Trust me, after importing a bunch of stuff and needing to delete a bunch, this is tedious.
No more. You can put a button at the bottom of each post which will allow you to delete the post, right from the main page. Sweet. It needs to go into the WordPress Loop- and to get it to appear at the very bottom of each post, place it right before the last part of the Loop. This code goes into Index.php
You’ll find the code right here in this post.
Just plop the code just before the last line in The Loop, save it, and when you’re logged in, you’ll see both the usual edit button, but also the new Delete button. Sweet.







