WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 4 months ago

#35398 new enhancement

Allow post types to override `posts_per_archive_page`

Reported by: sebastian.pisula Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords:
Focuses: Cc:
PR Number:

Description

fixed

Attachments (1)

35398.patch (3.2 KB) - added by sebastian.pisula 4 years ago.

Download all attachments as: .zip

Change History (2)

#1 @swissspidy
4 years ago

  • Summary changed from Param `posts_per_archive_page` don't work to Allow post types to override `posts_per_archive_page`
  • Type changed from defect (bug) to enhancement

Just to be clear, you're suggesting that the "Posts per page" setting should be configurable per post type in register_post_type(). And I suppose you mean posts_per_page, since posts_per_archive_page is basically posts_per_page, but for archive pages.

As I mentioned on Slack, you can currently change the "Posts per page" option under Settings -> Reading. It's not dependant on any post types, though the pre_get_posts filter can be used to filter the option dynamically.

Note: See TracTickets for help on using tickets.