[wp-trac] [WordPress Trac] #40239: Getting posts by post_name is broken
WordPress Trac
noreply at wordpress.org
Wed Mar 22 22:54:44 UTC 2017
#40239: Getting posts by post_name is broken
-------------------------------+----------------------
Reporter: programmin | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-------------------------------+----------------------
Changes (by peterwilsoncc):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
@programmin,
The correct argument is `name` rather than `post_name`, there's
[https://developer.wordpress.org/reference/functions/get_posts/#comment-1194
an example] on the dev reference site. For a full list of arguments, see
`WP_Query:parse_query()`'s
[https://developer.wordpress.org/reference/classes/wp_query/parse_query/
documentation] but be aware there are some differences in behaviour.
I'll close this ticket off for now but feel free to followup if I'm
missing something.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40239#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list