Articles of deleting

Delete post image attachments with jQuery from the front end

In my WP 4.4 Twenty Sixteen child theme I want to delete post image attachments from a front end form created by a plugin. To achieve this I followed this answer, but the delete links doesn’t delete anything (they link me to the top of the page). What is wrong here? UPDATE [SOLVED] With the […]

Delete post: 2 wp_redirect if pages are different

My website allows users to publish and manage posts from frontend. I’ve created a kind of account section where they have all their posts published which they can edit and delete. They can even delete posts through the post page (single.php). So 2 cases: My account page (listing all posts): quick actions -> delete post. […]

Problem : deletion failed, the theme requested does not exist

I had an awkward problem when i want to delete my theme, it gaves me this message: deletion failed, the theme requested does not exist wordpress. I can delete it from ftp manually but for client i want it to be deleted just from dashboard. Is any one have an idea how to resolve this […]

Auto delete posts based on content text

There are a bunch of posts which carry a line of same text. I am trying to figure out a way that will delete the whole post if it finds this text in its exact form. I haven’t been successful in finding a plugin that will achieve this, but have found those that will delete […]

get_delete_post_link() inside Loop stubbornly returns nothing

I’ve built a membership site where users can post listings from the frontend, edit those, and ideally also delete them. For the latter, I’d like to echo a “delete post” link to the frontend. The problem is that get_delete_post_link(). So from this: $theID = get_the_ID(); // inside loop echo $theID; <a href=”<?php echo get_delete_post_link( $theID, […]

Delete a user from frontend

I’m developing a user management table, in which an user (I’ve already set restriction for for some specific roles) can create/edit or delete a user. How can I delete a user by clicking on delete link or button, I have stored the id in a variable.

How do you make a custom post type items automatically delete items 3 months after publication?

I’d like somer code that I can place in my functions.php file that will only modify the specified custom post type. I have already tried several plugins, but all of them have more features than I need. It’s overkill to mess with things I don’t want them to mess with. Ideally, the code will: Set […]

Is codex right on deleting post?

The codex has this to say on wp_delete_post. When the post and page goes, everything that is tied to it is deleted also. This includes comments, post meta fields, and terms associated with the post. Which kind of suggests that if a post that had the tags a,b,c attached to it gets deleted, then, all […]

After deleting a post are terms, and custom meta deleted?

I have a custom post type setup with a custom taxonomy. Once a post is created with custom meta data and terms in the custom taxonomy. If I delete the post does it delete the terms and custom meta?

How safe is it to delete old posts edits to save database space?

After this question: https://wordpress.stackexchange.com/a/93902/27148 There is an answer that suggests deleting past edits directly from database, which would be nice, because I could create queries to delete specific edits only. But, Is this safe? Why?