[wp-trac] [WordPress Trac] #45666: adding "order" as query arg to the homepage url you are redirected to the last posts page

WordPress Trac noreply at wordpress.org
Sun Dec 16 22:43:01 UTC 2018


#45666: adding "order" as query arg to the homepage url you are redirected to the
last posts page
--------------------------+------------------------------
 Reporter:  giuse         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * component:  General => Query


Comment:

 Hi @giuse, welcome to WordPress Trac! Thanks for the report.

 `order` is one of the [https://codex.wordpress.org/Reserved_Terms reserved
 terms] in WordPress. In [source:tags/5.0.1/src/wp-includes/class-wp-
 query.php#L1543 WP_Query::parse_order()], any value other than `ASC` is
 treated as `DESC`.

 If the home page is set to display the latest posts, adding
 `?order=something` doesn't seem to affect anything.

 If a static home page is selected in Reading Settings, this parameter does
 indeed show the list of latest posts instead of the home page, but I don't
 necessarily see an issue with that.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45666#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list