-1
votes
2answers
46 views

Deleting first four characters from all Post Titles

I have a wordpress autoblog.. I need to delete first four characters from each single post title automatically.. How can I achieve it?
0
votes
1answer
22 views

How to only allow post to be deleted if custom field doesn't exist

I have looked at both the delete_post and before_delete_posts. Neither of these hooks actually allow me to perform a check and then tell wordpress not to delete the post. Anyone got any ideas?
1
vote
1answer
58 views

Posts are deleted everyday at night

So I have a weird issue with WP and that is that all Posts on the site are getting deleted sometime in the night. Before I turn of all plugins and change theme to default.. I would like to know if ...
1
vote
2answers
119 views

Downgrade user from role that allows post creation

I am an admin of a multi-author blog. I am implementing a monitoring system which will require me to downgrade a user from an 'author' (this role allows them to make a custom post) back to the ...
0
votes
0answers
24 views

How to delete many posts or CPTs at once

For test purposes I often create many posts on my local site. Sometimes I need to clean everything and it takes ages to remove posts screen by screen. Is there a faster way?
0
votes
1answer
50 views

How to restore deleted post related with deleted users

I accidentally deleted post that related to certain users in wordpress because I deleted user. How can I restore those posts? Thank you!
0
votes
1answer
54 views

How do I restore my site?

I accidentally deleted all my pages and posts from my wordpress admin. I was trying to delete some dummy data that one of my plugins installed on the website and wham!, all my posts and pages were ...
0
votes
1answer
64 views

Delete post from admin but not from database

Is it possible to have a post not deleted from the MySQL database on deleting from the wp-admin panel ?
0
votes
2answers
573 views

How to hook a function only when I need to delete permanently a post?

I need to hook a function only when I delete permanently a post from the database, I've tried the 'before_delete_post' hook, however, it's called both when it's trashed and permanently deleted. The ...
1
vote
1answer
838 views

Wordpress Delete hook with wp_delete_post function?

I have this action/hook: add_action( 'before_delete_post', 'my_delete_function' ); function my_delete_function($post_id) { global $wpdb; $achievement = get_the_category($post_id); $h = ...
0
votes
2answers
836 views

Get post id in wordpress action?

I have this code add_action( 'delete_post', 'my_delete_function' ); function my_delete_function() { global $wpdb; $wpdb->query(" DELETE FROM wp_votes WHERE post=".$thePostID." ;); } ...
0
votes
1answer
71 views

Run a function when post is deleted?

Is it possible to run a function every time a post is deleted. The function has to be run when the post is deleted from the admin or by the wp_delete_post() function.
2
votes
0answers
242 views

Posts mysteriously disappearing/deleted [closed]

I'm looking for help about this issue I've been having on one of my client's sites (http://revistero.mx it's in spanish) The problem is that somehow, every once in a while the last published posts ...
0
votes
3answers
158 views

Wordpress Post Deletion Issue

I have installed wordpress on one membership site and found that whenever editor writes post on wordpress and attempts to post it, deletes the half of post randomly. I don't know what could be the ...
1
vote
1answer
1k views

Delete Post From Front-End and attachment permanently

Is there a way to delete a Post From Front-End and it's attachments permanently? This is a snippet that moves the post to the trash can, but it doesn't remove attached images (they remain on the ...