Make WordPress Core

Opened 11 years ago

Last modified 7 years ago

#35398 new enhancement

Allow post types to override `posts_per_archive_page`

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

Description

fixed

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

#1 @swissspidy
11 years ago

  • Summary Param `posts_per_archive_page` don't work → Allow post types to override `posts_per_archive_page`
  • Type defect (bug) → 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.