The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
15 views

Which delete query is better with prepare or delete

Just wondering which of the two delete queries would be the preffered method $qdel = $wpdb->query($wpdb->prepare("DELETE FROM $shopping_meta_table WHERE meta_shopping_key = '%s' AND wp_user_id ...
1
vote
2answers
73 views

How to mass-delete inline styles in Wordpress custom post type automatically?

I'm looking for a pragmatic way to delete about 100+ individual pages worth of inline styles. I had entered in content for a client by copying and pasting from Word, which took all that data with it ...
0
votes
0answers
19 views

How to prevent deleting a user

I'm trying to disable the user when the user is deleted. So I want to keep the data of user, but preventing access. I know that I've the option to reassign in wp_delete_user() but I prefer keep the ID ...
0
votes
1answer
28 views

Auto delete Wordpress users according to time

In my wordpress site spam users are registered so i am add mail confirmation to my resister area. And my problem is how can i delete users when not check or activated the mail. is it possible to ...
0
votes
2answers
37 views

Why does my delete_post hook get called twice

Here is how I've implemented it: add_action( 'delete_post', array( 'MyClassName', 'delete' ) ); In the delete function I was using a $wpdb->insert command to see whether the function gets called. ...
0
votes
0answers
214 views

Set up dataTables row delete rather than php and page refresh

I am using the dataTables jQuery plugin to display a table in a wordpress site with data from a custom table and it works well. I have added select check boxes and once a row or rows have been ...
0
votes
0answers
16 views

Run Jquery Script after delete post in front end

I have a list of posts on a page on the front end. With each post I have created a delete button with get_delete_post_link. This works fine but I now need to execute some jQuery after the post is ...
0
votes
0answers
19 views

User is not being deleted from wordpress admin dashboard

I have a wordpress blog and I'm trying to delete a certain user from my admin dashboard. But when I delete this specific user and refresh the page, he remains on the users list. The only thing that ...
0
votes
2answers
51 views

How to delete remain data in WP database after deleting custom post via admin interface

I'm trying to create a plugin that will delete pictures and additional info from database on deleting custom post (sp_venue) via admin panel (wp-admin/edit-tags.php) In the plugin I'm using this to ...
0
votes
1answer
45 views

I can't add more pages to menu - menu delete pages

Two days ago I decided to add three more pages to the menu on my site. I already had like 140 pages in the menu, so this is something I know how to do. But I hadn't done it in some months, so maybe ...
-4
votes
2answers
70 views

How to instantly delete posts/pages permanently?

For development purpose I need to constantly fill and unfill a Wordpress instance with dummy content. Deleting everything in two steps is quite annoying, so I'm wondering if there's a way to cut the ...
0
votes
1answer
36 views

How to make the 'delete' button inactive on some categories?

As currently there's no way to declare any new custom post format in WordPress (3.9.1), is there a way I can make the 'delete' button on some categories inactive, so that the Editor can't remove them, ...
1
vote
0answers
24 views

Wordpress stuck in deleting user

We’ve run into an issue with our WP Multisite where we cannot delete user accounts. The URL i keep getting is: http://example.com/wp-admin/network/users.php?action=dodelete It should look something ...
0
votes
1answer
65 views

Delete link on single-custom.php with redirection

I need to provide a delete link for my users on the single page of a custom post type. But when the entry is deleted the user will end in a nothing found on this page wordpress error (because we are ...
3
votes
1answer
186 views

Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?

I am looking for solution to auto delete images of old posts in WordPress site. I want to hold images of current 50 posts, others should be deleted automatically. It can be function to delete on time ...
1
vote
1answer
2k views

Delete row of custom table in WordPress using AJAX

From my custom table ($table = $wpdb->prefix . 'user_req';) I'm showing data with $wpdb->get_results() and a foreach loop: I managed to update the database with the individual values from the ...
1
vote
2answers
595 views

Correctly delete posts with meta and attachments [duplicate]

I am having an overview of custom post types: http://www.citizen-science.at/wordpress/projekte/roadkill/ubersicht/ These have custom tax and also an attachment. In my overview I need to provide ...
0
votes
1answer
26 views

Delete attachment with post

I'm trying to post a delete Link for a user so he can delete his own entries: global $post; if ( !current_user_can( 'delete_bkroadkill', $post->ID ) ) return; $link = "<a href='" ...
0
votes
0answers
91 views

Problems with installing and deleting plugins

When I want to install a plugin from the web interface, I receive the error The plugin does not have a valid header. or Destination folder already exists. after it has been downloaded and ...
1
vote
1answer
170 views

get_delete_post_link redirect

I am using this to allow users to delete their own posts on the front end of my site: <a onclick="return confirm('Move this post to the trash? You can restore it later.');" href="<?php echo ...
0
votes
3answers
124 views

Prevent from deleting any user role but subscriber

In the administration of my blog, I would like to prevent anyone (admin included) from deleting any user unless it is a simple subscriber. Basicaly, in the "users" section of the administration, I ...
0
votes
0answers
9 views

Permanent names of attached files required

Simple: How to delete uploaded file ? Secondary: How to replace uploaded file and to keep its filename (inclusive the path) and all links (inclusive on the whole internet!!!) the same?
3
votes
2answers
178 views

Delete all the custom post types when deleting user

I have a problem in custom post types, when I remove user, I can't deleted there post or attribute all posts.
0
votes
0answers
46 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
1answer
22 views

How to delete orphan userdata from array in wp-options

I have an option that subscribes members to forum email notifications. The list of emails is in an array as an option value. All is working fine and all subscribing and unsubscribing is done using ...
1
vote
1answer
66 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 ...
0
votes
2answers
395 views

Safest way to bulk delete post revisions

One of my clients is on a rather large blog in terms of number of posts and traffic. I'm trying to get her database down to a manageable size, and one thing that's bulking up is literally tens of ...
0
votes
1answer
58 views

remove a single post_meta

I created a plugin that has multiple meta boxes. One meta box saves a single record by using update_post_meta(). Another meta box saves multiple record by using add_post_meta(). I do not have ...
1
vote
3answers
506 views

Alow users to delete uploaded images inside backend?

I am allowing user's to upload their images, so to show their uploaded images i am using<?php echo $options_images['image_bg'];?> which outputs ...
0
votes
0answers
38 views

Deleting users do not deletes coments

Hello I have bee trying to figure this one out without any luck. I am deleting users from my site, and selecting either delete comments or attribute comments to: options do nothing. The user does not ...
2
votes
2answers
203 views

Redirect After Delete User in Backend

How do I redirect to a certain page after user deletion? For demonstration purpose, let's say I want to redirect to the dashboard on user subscriber deletion. This is what I have tried so far: ...
0
votes
1answer
107 views

Delete Term via edit-tags.php

I might get rep'ed down on this - but is there suppose to be a "Delete" link on the edit-tags.php page? Note: not the WP-List-Table, but the actual page where you specifically view the terms ...
0
votes
0answers
341 views

Delete associated thumbnails when calling wp_delete_attachment

I have a somewhat straightforward script that allows users to upload their own avatar from the front-end. Another script allows them to delete their avatar, before uploading another. The ...
0
votes
1answer
56 views

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

After this question: http://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 ...
1
vote
2answers
101 views

How to delete old posts' edits to save space?

I need to delete old edits and autosave, they have grown overtime, and are not needed anymore, seeing this post: http://wordpress.stackexchange.com/a/67228/27148 it states: If you have no use ...
0
votes
1answer
120 views

bulk deleting empty items in the media library

I wrote a function, which should rename my attachments, based on the post title. Unfortunately this function created over 10.000 empty instances in my media-library, before I was able to stop it. The ...
1
vote
1answer
402 views

Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How?

Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How? Is there an easy quick way to do this? To delete all Pages, Posts, Comments and stuff that got imported? Or ...
0
votes
1answer
133 views

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?
0
votes
1answer
188 views

wp_delete_term or wp_delete_category?

Hi I need a simple piece of code to delete a category for a custom plugin, but I just found two function references that seems quite the same: Function Reference: wp_delete_term Description: Removes ...
5
votes
3answers
825 views

How to delete post revisions?

I haven't set a limit to the number of revisions, which makes some of my post have more than 20 revisions, so how to delete these revisions? By the way, I am using WPMU and have many blogs, so how to ...
0
votes
1answer
111 views

Delete a specific item menu when I deactivate my plugin (resolved)

When I activate my plugin (register_activation_hook), I add a new specific page and a corresponding item menu in the custom menu. No problem here. When I deactivate my plugin ...
1
vote
2answers
1k views

Nav menu items disappearing (but not immediately)

I'm working on a site where some of the nav menu items disappear (from the front end, the back end, and the database). However, debugging is extremely difficult since they don't disappear immediately! ...
0
votes
2answers
50 views

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 ...
0
votes
1answer
203 views

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 ...
4
votes
5answers
381 views

Delete Post With No Traffic?

My site has over 8k posts, some of which are outdated. To keep site maintainable and tidy, I want to delete all post with no traffic. Can this be done? Is there any plugin for this purpose? Or any ...
3
votes
1answer
1k views

delete attachment from front end

logged in as admin and trying to code that deletes posts to delete an attachment. got, <?php if (current_user_can('edit_post', $attachment->ID)) echo "<a href='" . ...
1
vote
1answer
534 views

update user information

this is my code /* Update user information. */ if ( !empty( $_POST['url'] ) ){ update_user_meta( $current_user->id, 'user_url', esc_url( $_POST['url'] ) ); else{ ...
0
votes
2answers
267 views

Deleting old posts

I have around 30 old posts that I want to delete on my blog. Can I just delete them permanently or should I worry about the "errors" I will get on my google webmasters tools and redirect them somehow? ...
0
votes
1answer
78 views

How to display an alert when deleting a plugin?

My plugin allows for some custom templates to be installed into it by the user. Problem is, if someone deletes the plugin from WP in order to install a new version, all their custom files get deleted ...
3
votes
1answer
344 views

Threaded comments - deleting parent comment leads to orphan comments

Got an issue on a site where deleting a comment with replies (where threaded commenting is activated), leads to the child comments being orphaned, causing unexpected behaviour (such as the orphaned ...