From looking at the source quite curiously $force_delete
argument in wp_delete_post()
only applies to native posts, pages, and attachments.
My quick guess would be that for CPTs you would need to use explicit wp_trash_post()
function if you want trash behavior.
Related Posts:
- How to change “Draft” string for status of custom post type to “Unavailable”?
- WordPress Custom Post Types with a page as a parent?
- Custom post status not working
- Get custom post type by category in a page template
- How do you output custom code between posts in the loop?
- Get rewrite slug of custom post type in template
- Weird problem happening with custom taxonmy when creating/updating posts
- How to customize a permalink (URL) structure?
- Update postmeta Parent when post_status child change
- Creating a non-hierarchical Taxonomy that behaves like categories
- post_content is stripping HTML when adding a new post? [closed]
- Displaying One Custom Post Type’s Content On Single Post of Another Custom Post Type
- How do I ensure that post_type and Taxonomy use the same slug?
- How to display “Trash” in my custom post type?
- Why is my custom post content only viewable when signed into WordPress?
- How to limit the number of custom posts certain users can publish in WordPress using php script?
- Stored meta from attachment, video length?
- WordPress deletes custom posts instead of trash them
- WordPress query posts by custom post type not workng
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Select Menu for Custom post Type does not save
- Inserting two categories
- Custom post types with custom directories
- WP_Query search posts by custom post type and custom taxonomy
- Saving repeated option values in a custom query
- Check Title Unique Or Not and If not error message and dont save
- 1 day after custom date change post status to draft
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- Dynamic Custom Post Type Plugin
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- I am having a problem with form updating/editing WordPress post on the frontend
- How to filter out post type meta?
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- Display custom field of specific post where post title matches variable
- Conditional to modify query results
- Loop through posts of a custom-post-type (event) and create .ics (iCal) file?
- How does the $post_type global variable work?
- Remove All, Published and Trashed Post Views in Custom Post Type
- How to customize admin posts based on the user who is logged in
- Custom Post Type | Fatal Error on register_post_type()
- Output custom post shortcode. Help spot the error.
- How to count custom post types with conditional operators
- Custom Post Type, Saving Multiple Checkboxes
- How can I display custom post types under multiple views?
- How to post twitter like updates on wordpress
- Show Two custom Post type and their posts on category page
- How to get all `supports` attributes by post type?
- How to create an advanced filter search?
- WP_Query is printing out only one post when posts_per_page is set to multiple
- WP Query to displaying date and posts for that date?
- GravityForm: Populate Dropdown with custom post type [closed]
- Return array of categories to php function for current post
- Link users to a custom post type
- Custom search for custom post meta with pre_get_posts interferes with WP search
- Create a random unique 6 digit number as custom field for custom post type
- How to output wordpress custom tags separated by comma?
- Loading all files within a directory
- Assigning the same custom meta box to multiple post types
- Blog page showing same content as homepage
- apply filters only to specific post listing without check the url parameters
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Dynamically add / duplicate custom meta in custom post types
- WordPress if in term*
- Custom post type and body_class: Remove “blog” class
- Setting posts per page in query_posts
- How to insert content from another Custom Post type into Post?
- Using several custom fields as custom post title
- Custom Post Type without an archive page
- Show Different Header on a Specific Post ID
- Get Post Primary Category
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Placeholder in HTML editor text area?
- Auto-generated posts not showing in backend (but being counted!)
- Deleting Custom Post type data using mySQL command
- Admin notice not displaying
- How can I create a custom meta box to add an mp4 video to a page?
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- Adding custom tables to WordPress
- Delete link on single-custom.php with redirection
- How to structure a site with product variations pages?
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- CPT: if more than X images are in post, use pagination
- Very Slow Page – How to Optimize # of Queries?
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- Dynamic page outside WordPress
- Getting rid of /my_custom_post_type/ in the single view URL
- Custom post type menu missing after 3.0b2 -> 3.1.2 upgrade
- Custom Post Type – List all attachments on Edit Screen
- Using wordpress template tags within an array
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Getting the URL of the parent page
- Custom query to filter posts that have current post as a taxonomy [closed]
- Custom post type permalink returns bad url
- Return the thumbnail meta data for getter and setter
- How to limit post of custom post status?
- How to display selected taxonomies by their parent
- Group posts by custom post type
- Custom Field Order by Last Name and First Name