you need to specify the post_type in your $data
array :
$data = array(
'post_type' => 'classifieds',
'post_content' => stripslashes($output),
'post_title' => stripslashes($title),
'post_date' => date('Y-m-d H:i:s'),
'post_category' => array($cat_ID),
'post_status' => $statusPost,
'post_author' => $post_author
);
Related Posts:
- How do I set the default admin sort order for a custom post type to a custom column?
- Delete all posts of a custom post type—efficiently
- Create category only for custom post type
- Reducing the use of global $post
- Custom Post Types not showing on Custom Taxonomy archive page
- is_singular() not working if called via callback function of admin-ajax.php
- Search everything (posts, pages, tags, cpt, meta)
- Reslug a Custom Post Type
- Removing CPT slug from URL results in 404 error for archive page
- front end radio custom taxonomy with custom post type
- Search Post Title Only [duplicate]
- Custom post type’s slug gets wrong when adding a custom meta box
- Displaying Meta Box Image
- Beginner question: Accessing functions.php through admin web interface in order to import custom post types?
- How can i list custom post type categories?
- Query Custom Post by Category
- Custom post type routing with hierarchy
- Role Capabilities: Add New Ones?
- Sub-Sub-Blogs — creating and importing content into a custom sub-type
- Custom post type capabilities require “create_posts” to access the edit posts list page
- Custom post type with slug for plural (archive) and for single
- Custom post type archive not regarding ‘posts_per_page’ => -1
- If post_type is This or This
- wp_list_pages(); Change output of hyperlink
- How to auto increment post title & post slug field?
- Plugin for custom posts and fields [closed]
- Remove rows in the manage post/page view
- Setting proper query for multiple custom admin filters
- Custom meta box data array: foreach not working correctly?
- Making a custom help center page
- Pagination for custom php code
- How to check if user meta field is empty in conditional else statement
- Display only one post each WEEK
- Customize Query for post
- Custom Post Types don’t highlight in menu nav
- Custom post type getting wrong categories and tags
- How to Create an Image Upload Box for Custom Posts?
- How to filter wp_list_categories output with some custom post type meta query?
- Callback to custom field is not working in WordPress REST API
- Query Post Object in WP Admin
- delete_published_posts does not work
- Users create/join groups
- Next Post links not working in custom post type shortcode
- how to determine we are in add new custom post type or edit custom post type
- custom comments form for custom post type
- Single custom post type’s menu ancestor/parent is Posts archive page
- Want to be able to sign up subscribers as authors
- WP the_posts() on single-cars.php get category link
- tax_query not working in template
- Custom Post Type Dilema – How do I categorise by country?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- Custom Post Type & Custom Menu Walker to append custom class for active post types
- Exclude current post for custom post type
- Publish and save specific postmeta to a filtered post_type
- how to associate several authors to a custom post type
- Pagination 404 on Index with custom query
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Which file/template is in charge of taxonomies for custom post types?
- Address as a content type post
- Using menu_position to add two entries between Dashboard and Posts
- How to manage selected post-formats in custom post type
- Remove default WYSIWYG editor without removing custom fields editors
- File sharing platform for user contributions? [closed]
- List All Custom Post Types Posts in Nav Menu Dynamically
- how to get options to choose post format in add new post
- Update ACF fields on a frontend form? [closed]
- Page-CPT.php redirects to archive or single.php
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Printing errors during save custom post type
- How to setup a permalink structure for a custom post type
- Filtering Custom Post Type by Comparing Date and Two Meta Keys
- Loop and add Specific Categories and Products Images
- Is possible register two archive pages for single custom post type?
- Include “Scheduled” (“Future”) Posts in WordPress Post Navigation ( previous_post_link, next_post_link ) for a Specific Custom Post Type
- Custom Post Type with Different Sets of Post Content?
- Add a class to a div if custom post type has specific terms?
- Custom post type paging return home page
- Custom taxonomy returns 404 even with saving permalinks
- Where is get_post_meta value located?
- 2 modal windows with ACF content on Archive page
- Custom post type single page uses the right template in preview mode but shows a different template after being posted
- Custom Post Type works when registered in functions.php but not when registered in plugin
- Custom post type shortcode with taxonomy attribute not working and no errors
- Custom Post Type – Display all, wrap in groups of 3
- Showing Custom Post Type with his templates on a custom page template
- Get name CPT with slug taxonomy
- How to pass modified post to RSS feed?
- Custom post edit page permalink links to edit page rather than the post
- How to mark posts as visited
- get children from current variable (taxonomy) via shortcode
- Show Templates in Custom Post Type Editor
- Custom Post Type as invoice or order template
- How can I make a custom post type that loops pages in a new dashboard page, each single page is a new dashboard page (all within the back-end)?
- How can you preserve URLs when moving posts to a custom post type?
- Two blogs on same WP website
- Pagination not working for archive
- Save post_parent in a custom post type
- WPNavi pagination links not working on custom pages
- Rewrite Rule for custom post type link with or without taxonomy terms
- How to add to taxonomies to a post type