WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#51155 new enhancement

Default Order and Order By for Post Types and Taxonomies

Reported by: 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.


2 months ago

#2 follow-up: @johnbillion
2 months 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
2 months 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.