[wp-trac] [WordPress Trac] #40239: Getting posts by post_name is broken

WordPress Trac noreply at wordpress.org
Wed Mar 22 20:32:15 UTC 2017


#40239: Getting posts by post_name is broken
-------------------------------+-----------------------------
 Reporter:  programmin         |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 Getting posts by the post_name, or slug, is currently broken... or the
 documentation is broken:

 {{{#!php
 <?php
 var_dump(get_posts( array(
                                 'post_name' => 'anyreallyuniquename',
                                 'post_status' => 'any'
 )));
 }}}

 Why in the world should this be a listing of 5 recent posts?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40239>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list