wp_delete_post() deletes all custom post type entries without leaving it into trash

I have a custom post type create, and added a couple of posts for this CPT, and I have been trying to add the function of edit/delete post individually.

I used wp_delete_post() which accepts $postid and $force_delete (default is 0). I used it like this

Read more here:: wp_delete_post() deletes all custom post type entries without leaving it into trash

Leave a Reply

Your email address will not be published. Required fields are marked *