Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#51155 new enhancement

Default Order and Order By for Post Types and Taxonomies

Reported by: dshanske's profile dshanske Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Query Keywords:
Focuses: Cc:

Description

Inspired by #49912.

When you register a custom post type, or a taxonomy, you should be able to set the default order(ASC or DESC) and order by parameter for that post type or taxonomy archive.

Change History (3)

This ticket was mentioned in Slack in #core by dshanske. View the logs.


4 years ago

#2 follow-up: @johnbillion
4 years ago

My Extended CPTs library supports this via the archive argument.

It seems odd to only support the ordering query vars, rather than all query vars.

I'm not really sure this belongs in core to be honest, but I'd be amenable to it.

#3 in reply to: ↑ 2 @dshanske
4 years ago

Replying to johnbillion:

My Extended CPTs library supports this via the archive argument.

It seems odd to only support the ordering query vars, rather than all query vars.

I'm not really sure this belongs in core to be honest, but I'd be amenable to it.

I'm curious if there is broader interest.

Note: See TracTickets for help on using tickets.