[wp-trac] [WordPress Trac] #20105: When inserting a draft post with wp_insert_post you can't query it on name

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 23 05:22:39 UTC 2012


#20105: When inserting a draft post with wp_insert_post you can't query it on name
-------------------------------+------------------------------
 Reporter:  markoheijnen       |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Post Types         |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------
Changes (by solarissmoke):

 * keywords:  dev-feedback => reporter-feedback


Comment:

 Replying to [ticket:20105 markoheijnen]:
 > You can't query it with get_post. In my case I used the argument: name.

 I don't understand? The only arguments that `get_post()` accepts are
 either a `post_ID` or a post object. You can't use it to fetch a post
 based on slug etc.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20105#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list