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
- Display a query with multiple post types and same relationship on a single page
- How to set a default format for a custom post type?
- Restrict a Post Types Post Status
- Delete all the custom post types when deleting user
- automatically create taxonomy with same name as post title
- How can I remove categories in menu in custom post type?
- Search results ordered by custom post types are not grouped
- saving custom post type data to different table in wordpress
- Query post types with multiple keys
- Limit Authors to their Own Posts on front-end excluding admins
- Programmatically adding posts
- Keep main articles and author blogs seprerate, News / Magazine like site
- Conditional to modify query results
- 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?
- Return array of categories to php function for current post
- Create a random unique 6 digit number as custom field for custom post type
- Loading all files within a directory
- Placeholder in HTML editor text area?
- How to make a field appear only if a post meta field has a defined value?
- How to integrate video slide using custom post types?
- Show titles, date of all posts on single category page
- Allow users to create posts without logging in?
- Redirect to another page using contact form 7? [closed]
- Categorise Custom Post Types
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- WP_Query Custom Post Type if Category ID Equals
- Control content before and after custom post type loop
- How to use a variable as a function name?
- attach CPT data to a taxonomy
- Shortcode is displaying the content on top of the page [duplicate]
- Custom Post type content within a slider
- custom post type by author – wp job manager
- Displaying a custom post type using get_template_part into a specific layout
- WordPress as a frontend website for iOS app [closed]
- Let users upload image(s) to the post from front end
- custom comment fields on CPT
- Using page title as a link to term archive
- How set template for “custom post type” individual post
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- pagination for custom post type archive page
- Setting Parent Page to Post
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Custom Form / Search with Custom Post Type Data
- Archive page for WordPress Custom Post Type doesn’t show pagination from paginate_links()
- Is it possible to get the specific content on the search page?
- Search for custom field input of a custom post type in ajax live search
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Custom post type defaults to index.php for archive page
- customize Dokan multi vendor: how can i set every Dokan as child of another dokan?
- Set a template on a custom post in the plugin
- Update post status from “publish” to “trash” prior to year 2018
- Persist meta box choices throughout all posts of same post type
- Do not show child pages within a file page
- Search result based on URL
- Custom status and permalinks don’t work?
- How to mix 2 kinds of post types
- Link two different post using there post_id in post meta
- Help with Travel Guide Setup
- Show custom taxonomy not in submenu
- Custom Post save causes 500 error
- date archive future posts
- Custom post tag images not displaying with ACF
- How do I get a nested query to only display content that the main query outputed
- Function not pulling image or text from custom post type
- WordPress Custom Post Type and sort by Tags
- Delete attachment with post
- Get link for feed of specific post type AND taxonomy
- posting twice from an array?
- Pagination not working on homepage
- Custom post type – columns order
- custom post-type query just returns two posts
- Order custom post type is beign ignored
- How do I filter a custom post type loop by a field?
- Custom post type is_singular condtional not working when managing sidebar display
- Delete old thumbnail when updating new