Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#52881 new defect (bug)

Recent posts widget: "Number of posts to show" option is ignored when on category pages

Reported by: benjaminantoni's profile benjaminantoni Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.7
Component: Widgets Keywords: reporter-feedback
Focuses: Cc:

Description

WP 5.7. Using the widget "Recent Posts." I have not altered the widget. On most pages it works, but when on category pages (archive pages for category), it ignores the "number of posts to show" option, and shows a long long list of posts.

Change History (1)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Widgets
  • Keywords reporter-feedback added

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

I could not reproduce the issue on a clean install. Does it still happen with all plugins disabled and a default theme (Twenty Twenty-One) activated?

Looking at the widget code, the number of posts does not depend on category archives in any way, so this seems like a plugin or theme using a filter like pre_get_posts without targeting the right query.

Note: See TracTickets for help on using tickets.