Well, the problem is quite simple: it’s publish
, not published
.
According to the documentation:
post_status
(string / array) – use post status. Retrieves posts by Post Status. Default value is ‘publish
‘, but if the user is logged in, ‘private
‘ is added.
Related Posts:
- How To Remove These Stuffs From Custom Post Type List Screen?
- Sort custom post type list table by display name of a user id stored as post meta value
- Why does my custom taxonomy show a total count across all post types
- Get post ID from wp_insert_post()
- Add content in custom post type page after the title and before columns
- WP insert post and custom taxonomy
- How to Remove Certain Screen Options and Table Columns from post type in wp_list_table?
- Add content before/after admin post wp-list-table
- WP_List_Table Inside Metabox Not Working on Submit
- Redirect after deleting post and keep track of pagination
- How do I programmatically add items of content to a custom post type?
- Add custom column at custom posts list
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- Custom Post Type or Custom Tables
- How I upload, save and set a featured image from my frontend?
- Trying to save custom post type from frontend partially working
- wp_insert_post custom taxonomy
- Assign category to front end post
- How can I programmatically save data into custom fields that contain serialized data?
- How i add new link after Edit | Quick Edit | Trash | View in quick edit section
- What hook should be used to programmatically create a post only when master post is updated?
- Row actions not showing? Why?
- Is there a way to list posts of only a certain category
- How can I add a column in the wp_list_table of the admin area?
- How to use custom post type APIs, but use a different db table
- WordPress tax_input only if logged in
- Programmatically adding posts
- Is it possible to create a post using a metabox?
- How Can I Set the Post Author of a Post I Just Created With PHP?
- How to auto increment post title & post slug field?
- Auto-generated posts not showing in backend (but being counted!)
- wp_insert_post generates endless posts
- Add acf field in title (admin table)
- Default sort on admin columns with meta date hides draft posts with empty date value
- create parent post using wp_insert_post
- Cron job for creating posts not excecuting properly
- How to checked selected category checkbox when my custom post inserted from frontend
- Show post in table front end
- Add custom column to post list table
- Post author for revision not being set on update/insert
- Add CPT values to Database
- How to sort posts in a custom post type by title in ascending order by default?
- Why cant I add a custom post type to a custom taxonomy?
- wp_insert_post wrong post type [closed]
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- sortable columns for multiple custom post types not working
- Update post if exist from PHP
- WordPress hook which triggers on post import
- How to add query args to links to CPT admin submenu
- How to handle new post from API request?
- How to handle this specific case of custom post type?
- Odd behaviour for the update button when displaying a WP_List_Table
- insert image with custom post type
- importing table data to custom post type
- How can I get some of a posts meta data whilst it is still inserting?
- How to create a master without relying on posts table
- How to customize custom post type’s list table?
- See if the email exists or not
- Clone wp-admin/users.php (Users Admin Page)
- WP_Insert_Post creating duplicate posts when logged in
- wp_insert_post from XML feed only inserting first post
- What is the correct way that when creating a custom post type assign values to custom fields created with pods framework?
- How do I find out which (page) template file my custom child post is looking for?
- How to select meta key in custom database query
- Issue removing columns from admin table
- wp_insert_post deleting previous post custom meta
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- Published page but it is page not found
- How to insert post 6 times after user register like ask.fm
- wp_insert_post() creates duplicates with ‘post_status’ => ‘publish’
- automatic creation of custom post type articles
- Submitting custom post from frontend,jQuery ajax, and custom validation – can’t find proper place to insert wp_insert_post()
- UPDATED: Save a custom_field value when automatically creating a post using wp_insert_post
- Generate slug and meta data if meta field is empty
- Add a image to a post published on a CPT from the front-end
- wordpress form processing to custom post type not working
- Change column of row action (Quick Edit) links in WP_List_Table
- Show all post types in the same table of posts [duplicate]
- install.php Custom Taxonomy Term not being added to custom post
- Omitted Content After Post-Publish Insertion
- Is this the correct way to add post-slug input field?
- wp_insert_post not working for custom post type?
- After wp_insert_post() custom post type does not show in the admin
- Using wp_insert_post to create custom posts with ACF image field
- Adding custom post type archives to a WordPress menu
- Custom Post Type archive as front page
- How to auto send email when publishing a custom post type?
- Dynamic page.php template for custom post types
- Parent / Child formatting in a list of post of a custom post type
- Custom Posts Types as Custom Fields
- Hierarchical Custom Post Types in Array
- custom post type and hidden url : what is the cleanest way to build CPT with custom page template?
- page menu entry for custom post type
- How to remove post listing page for a custom post type
- How to include term custom meta into the custom taxonomy term permalink structure
- Custom Taxonomy not being saved on custom posttype
- Different Ways to Query Custom Post Types?
- Jetpack Infinite Scroll won’t fire [closed]
- WordPress loop add heading before first of type
- Advanced Custom Fields: single-books.php works, books.php does not