The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
16 views

wp.getPosts with status = 'trash' using node.js

I was wondering how to set the filter option for wp.getPosts. I want to get posts with a status of 'trash'. filter is currently blank, and returns all posts other than trash. I am using the xmlrpc ...
0
votes
1answer
27 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 ...
0
votes
0answers
24 views

Custom Role can't trash Custom Post Type

I have a post type that I set up some capabilities for and I attached them to a new Role, however, the role can not trash them. I'm not sure why though. Here is the portion of my array for the ...
0
votes
0answers
15 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
3answers
38 views

Deleted pages showing up when querying for child pages

I'm using the following code to display the featured image, post_title and custom field data from relevant child pages. <? $child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE ...
0
votes
0answers
11 views

Notification to author on posts bulk trashing not working

I am trying to notify the author when a post is trashed. It is working properly, but when trying to trash multiple post from bulk action (move to trash), then it's not working. Any suggestions? Here ...
0
votes
0answers
37 views

wp_trash_post retrashes already trashed comments?

I have a few mail- and update_user_meta functions that fires when a post, comment or child comment gets thrashed. So when I trash a comment with trash_comment, a mail get sent to the author: "Hey, ...
0
votes
1answer
41 views

transition_comment_status gets called when untrashing comments

I can't seem to figure out why untrashing a comment, calls my "approve_comment_callback"-action. Any ideas? I just don't want it to send two emails at the same time, when I untrash a comment. Here ...
0
votes
1answer
68 views

Dynamically create/remove terms in taxonomy when custom post type is published/trashed

Am struggling a bit with creating & removing terms based on when a custom post type is published and trashed. Ideally, I would like to create a new term in my custom taxonomy when a custom post ...
0
votes
1answer
56 views

Trash a post, send associated comments into the trash bin (change status)

When trashing a post, all comments associated with this post get the status "post-trashed". They do not end up in the trash bin. In my theme the author gets a point for posting a post or a comment. ...
0
votes
0answers
41 views

Hook into trash_post_comments, update_user_meta

I have a theme where the author get points for posting posts and comments. When I trash a post, the user get 1 point removed from their score. This works fine with this function: However... When I ...
1
vote
1answer
91 views

When trashing a post, also trash related comments

As it is now, when I trash a post, the related comments get deleted at once. Is this standard? Instead I'd like them to be moved to the trash bin, when I trash the post. How can I achieve this? I ...
0
votes
0answers
17 views

Trashed “comment replies” still visible?

When I send a "comment reply" to the trash bin it's still visible on the site. It only disappears after you've deleted it permanently. Is there a way to fix this?
1
vote
1answer
39 views

Deleting the attached “comment replies” when trashing a comment

When sending a comment to the bin, the attached "comment replies" does not get trashed or deleted. How can you configure wordpress so that when you trash a comment, the comment replies automatically ...
0
votes
1answer
33 views

Conditionally process comments while ignoring replies

I use a WordPress theme that awards users points (kept track of in user meta-data) for posting comments. However, they are not awarded points for replying to a comment. When I move a comment to the ...
0
votes
1answer
24 views

What's the difference with trash_comment and wp_trash_comment?

I don't understand when I'm suppose to use trash_comment over wp_trash_comment. What's the difference?
0
votes
1answer
55 views

get_option('sticky_posts') returns stickies that are in trash

The value of get_option('sticky_posts') includes those that are in the trash. How can I get a value minus stickies that are in the trash? var $stickies = count(get_option('sticky_posts'));
0
votes
1answer
21 views

WP Posts Not Adding Up

My WP is hosted at Yahoo I am running WP 3.5.2 and the Posts Page does not add up All (4,356) | Published (629) | Sticky (1) | Drafts (265) | Private (88) WP seems to have an extra 3373 posts. I ...
0
votes
0answers
57 views

How to hook in to bulk trash posts

I am trying to hook into the trash post function in the bulk menu. I've managed to hook into an item when I trash it by it self by using the wp_trash_post hook, but this does not work when doing it ...
1
vote
1answer
141 views

How to use update_post_meta inside wp_trash_post

I have some metadata on my post edit page that saves perfectly using the hook and function below: add_action('save_post', 'save_meta_data'); function save_meta_data($post_id){ ...
2
votes
1answer
108 views

wp_trash_post not firing

I want to call a function when a post is placed into the trash. I want to do something more complicated than the following, but have simplified to what's below just to see if it'll work and it ...
0
votes
1answer
360 views

Add frontend “Restore” link

I am using get_delete_posts_link($postid) to let users send their posts to the trash from the frontend. Now I'm trying to replicate the same functionality for them to "untrash" or restore the posts as ...
0
votes
1answer
106 views

Comments screen in backend, how to disable Quick Edit | Edit | History | Spam | for non admins

I'm trying to adjust the comments screen for non admins to my project. Right now I'd like to disable Quick Edit | Edit | History | Spam under any comment left for any post created by the user. ...
0
votes
1answer
98 views

How to restore all items from trash

I have accidentally deleted a WP user. By deleting it, WP removed all the media files, pages etc. I could retrieve pages and posts from trash. But I could not restore media items. Is there a way to ...
2
votes
2answers
71 views

Is there an action that is called when a post is restored from the trash?

I'm looking at the wordpress list of actions and trying to find an action that is called when a post is restored from the trash but cannot find one. Does anyone know if it exists?
1
vote
1answer
145 views

Restrict access to the Trash folder in Posts

I want to restrict users from deleting posts permanently. How do I restrict access to the Trash folder in Posts? This is the only page were the users can delete their posts permanently. The only ...
10
votes
1answer
251 views

How do I programatically empty trash?

I need to create an "Empty Trash" button inside my plugin. How would I do it using PHP code?
1
vote
1answer
1k views

How to use wp_nonce_url() in a link?

I am creating a plugin to display all posts from all custom post type. It is something like in edit.php, but instead of displaying single post type,I would like to display all posts in one page from ...
0
votes
1answer
302 views

Problem deleting posts from trash

My clients has recently had a problem with spam posts being added to their blog, under various usernames. The users have been deleted, but Wordpress is not able to remove the posts from the trash. ...
0
votes
1answer
282 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
2
votes
1answer
373 views

How to change redirect after moving a page to trash?

How could I change the redirect location after a user trashes a page? Right now they go to all pages here:....wp-admin/edit.php?post_type=page I want them to go ...
3
votes
2answers
1k views

trash_post action with Custom Post Type

I have a Custom Post Type "empresa" and would like to send email when a post type is deleted (moved to trash). I have this function below for my POSTS, How can I use with my Post Type "empresa"? ...
2
votes
0answers
296 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
1answer
84 views

Conditional tag-like function to tell if post is in trash?

What could I put in my theme to tell if a post is in the trash or not? For example: <?php if (is_trash) echo 'This post is in the trash!' ?>
2
votes
2answers
1k views

Turn Off Automatic Trash Deletion?

I have a client who wants to use the trash feature, but keep items in there indefinitely (I have no idea why, but they insist on it). From reading this codex article on the trash status, I see that ...
1
vote
1answer
426 views

Comment Spammed vs Trashed

What's the difference between marking a comment as spam and trashing it?