The tag has no usage guidance.

learn more… | top users | synonyms

-6
votes
0answers
19 views

Need to delete images of post automatically after 30 days of published [on hold]

I need to delete only images of post after 30 days of published, the post status needs to be changed as draft. Any one send me the function code for that.
0
votes
1answer
464 views

Delete data from custom table in wordpress

i am trying to delete record from my custom table global $wpdb; $retrieve_data = $wpdb->get_results( "SELECT * FROM wp_paypal" ); echo '<table border=1 class="table table-striped"> ...
0
votes
3answers
1k views

How to delete all posts, categories and tags from Wordpress database

I have WP website with over 40,000 posts. Now I'll like to delete all posts, categories and tags. So All content and related meta. All I want to keep is static files. Is there a easy way to do this ...
0
votes
0answers
18 views

Deleted media library images return broken image even after reassigning correct image

I use Genesis as well as Easy Recipe Plugin. Versions all current as of 3/17/16. In Media Library I deleted a number of images previously used in my recipe posts. I then updated featured image and ...
0
votes
1answer
26 views

issue in wordpress auto delete post and redirect to another 1

i am getting strange issue on WordPress, my site is huge traffic and database. one thing.. my WordPress is updated 4.4.2 all plugins updated. now i get issue when i publish new post most of the posts ...
0
votes
1answer
98 views

redirects for removed/deleted woocommerce products

I need to remove some discontinued products from a woocommerce site. I'm just wondering how to go about automating this. I haven't figured out whether to throw a 301, 404 or 410 error, but either way, ...
0
votes
0answers
77 views

Let user delete comment on front end only

I have a edit comments page on my sites front end and have placed a delete comment link for users. The link works however it takes the user to the backend to confirm the comment deletion. I cant have ...
0
votes
1answer
73 views

Wordpress installation self deleted in server restart. SQL Tables gone too!

I have or had in this case, two wordpress sites running on a Ubuntu 12.04 server edition which were installed over the weekend. After installation both sites were performing as expected, no problems. ...
0
votes
2answers
82 views

l accidentally permanently deleted a Draft. There's any way I can recover it?

I recently started a blog and I was about to finish my second Post. I was cleaning up some stuff and decided to empty my Trash. I wasn't paying much attention to it because I wasn't expecting my ...
0
votes
1answer
94 views

Prevent attachment from being deleted

In Wordpress admin media library page (upload.php) I'd like to do some checking on delete_attachment action. I want my custom function to fire before attachment's being deleted. In this function I ...
0
votes
2answers
2k views

How to restore deleted pages/posts?

I recently deleted some pages in my wordpress site. Now I want to re-store them. How can I do this? Any suggestions will be appreciated. Thanks in advance
1
vote
1answer
250 views

How to mass delete one line from all posts

I need to delete some content from all posts. Every post starts with this line: <p style="text-align: center;"><img src="http://i.imgur.com/picture.jpg" alt="" /></p> So I want ...
0
votes
1answer
383 views

Redirect back to origin page after using get_delete_post_link()

I need to implement frontend and backend redirection after delete specific post using get_delete_post_link(). Which hook i can use? Any advice would be appreciated. Something similar to : <?php ...
0
votes
1answer
531 views

how to use hook deleted_user into custom function to delete user from custom table

I have a second user table in my WordPress database for a separate application that I am integrating. I need to be able to delete a user from this second table when the user is deleted in the ...
1
vote
3answers
5k views

Is It Possible to Restore Accidentally Deleted Widgets?

I accidentally deleted the widgets without dragging it to the inactive widgets section. I have a backup of all the files and the database but i have changed many things on the site other than the ...
2
votes
2answers
2k 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 ...
1
vote
1answer
20 views

Delete post by giving its link

It is possible to delete a post in WordPress using its link only? I can't find any possible way to do this.
0
votes
2answers
3k views

Delete tables from database when deleting plugin

I created a plugin and want to add a function to delete my tables from the database when a user deletes my plugin. I created a function that deletes tables from the DB when a user deactivates my ...
0
votes
1answer
4k views

How do I delete thousands of unattached images?

I have thousands of unattached images with no files. How do I delete them all quickly? ls: cannot access wp-content/uploads/2014/09/jeep cherokee patriot-Ekza.jpg: No such file or directory
0
votes
1answer
222 views

Restrict access to trash, only admin

I'm new in WordPress. I have to restrict access to the Trash for all users except the administrator. All users CAN move to the Trash, but only admin can delete permanently or restored. I do not know ...
4
votes
5answers
555 views

Delete Post From front Page ( With Wp-admin restriction )

am using this function to delete post from front // Delete from Front-End Link function wp_delete_post_link($link = 'Delete This', $before = '', $after = '', $title="Move this item to the Trash", ...
0
votes
1answer
1k views

How do I reset my footer.php to its original state? (theme: Origami)

I accidentally deleted some codes from my footer.php trying to get rid of the 'Theme By Origami' footer, and now the footer is all messed up. How do i reset it to its original state? I feel so stupid, ...
1
vote
4answers
1k views

Find out who deleted a page or post?

Someone moved a very important page on my website into the trash, and I do not know who did it! It was not deleted permanently so I don't need to worry, in that sense. The revisions, when I restored ...
1
vote
1answer
2k views

How to recover deleted site in Wordpress Multisite?

I went to Network Admin > Sites > clicked on a site and changed the site url for a child site. Now that site is gone altogether and I cannot get it back. What can I do now?
0
votes
0answers
35 views

If I delete my wordpress site then does that delete all my sites?

I have 2 wordpress sites, I didn't mean to but create 2 but i did. My main wordpress site I do not want deleted but If i delete the add on site i did not want (I know how to delete sites), will it ...
-1
votes
2answers
117 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
17 views

Privilege to recover trashed posts

I can't seem to find which built in privilege is required for recovering a trashed post. Would it be delete_posts, which is as its name suggests, can move items into the trash and remove them ...
0
votes
1answer
38 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
91 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
1answer
662 views

How to check what plugins used to be on a WordPress installation?

It's easy to see what plugins are currently disabled through /wp-admin — but how could I see what plugins used to be on an installation of WordPress and were deleted?
0
votes
1answer
135 views

delete user not working

Im just noticed that when I try to delete an user does remove the user, but not their comments. Also choosing the option to change the deleted user's post author to admin does not work either. Is ...
1
vote
2answers
300 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 ...
3
votes
1answer
1k views

Redirect after deleting post and keep track of pagination

I have a custom post list in the admin panel. This list is paginated, so this is it's url : wp-admin/edit.php?post_type=xxx, if I open the default page wp-admin/edit.php?post_type=xxx&paged=n, ...
0
votes
1answer
60 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
68 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 ...
1
vote
1answer
986 views

How to delete all post and attachments of a user when I delete it?

When I delete a user, WordPress can just delete the post or page of this user, not his custom post and his attachments. An idea for a special hook? add_action( 'delete_user', 'my_delete_user'); ...
0
votes
1answer
77 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
3answers
468 views

Remove the deleted user comment

Problem I have a user based site, so when user deletes his profile somehow his/her comments stay visible. There is no name and blank avatar with the comment. Is there any way to delete the comments ...
1
vote
2answers
166 views

Remove the deleted users avatar from list

Problem Hi everyone, I have a bit of a problem. I have a function that outputs the avatars of users that follow me . It works great, but if the user is deleted the avatars remain visible as a blank ...
0
votes
3answers
2k views

Delete all custom fields at once?

I have about 50 custom fields I need to delete at once, going through each one and deleting one at a time would take too long because it takes about 4 seconds for a page to load and I just don't have ...
0
votes
2answers
273 views

How do I reclaim either deleted pages or their permalinks?

A client deleted the the main administrator account. All the site’s core pages linked to the account, so they disappeared as well. The last known backup was in February, so can’t roll the database ...
2
votes
2answers
247 views

Akismet plugin is deleting spam despite preferences

Curiously, Akismet is deleting old spam comments after a period of time (I'm guessing within a week). This box is NOT checked: Auto-delete spam submitted on posts more than a month old. I've ...
2
votes
1answer
625 views

Upgraded from 2.8.x to 3.3.1 and lost content

First of all I did a manual upgrade of the wordpress site. I did everything by the book. I disabled all plugins, did all the backups. I upgraded to the new version, everything went fine. Only that I ...
1
vote
1answer
505 views

Front-end delete account in Wordpress

is there a way for a registered user in Wordpress to have in his author page an option to delete his account along with his posts without going to dahsboard? I need a front-end option in a form of a ...
2
votes
0answers
573 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
2answers
1k 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 ...
0
votes
2answers
2k 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." ;); } ...
1
vote
1answer
1k 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
1answer
117 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.
0
votes
3answers
170 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 ...