Automattic / Automattic/jetpack
Top Posts & Pages Widget: Filter popular posts by category
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
The [Top Posts & Pages widget](https://jetpack.com/support/extra-sidebar-widgets/top-posts-pages-widget/) displays either the most liked posts or up to ten posts that have received the most traffic in the past 48 hours. The [customization options](https://jetpack.com/2016/01/12/hooks-customize-top-posts-pages-widget/) do not include filtering the widget by category or tag. Such a feature would be useful to show "Top Ten Podcasts" or "Top Ten News Stories", for example.
#### Describe the solution you'd like
Ideally, the widget's configuration settings would have a similar categories checkbox to the post editor, allowing the user to select the categories that should be included right from the UI.
#### Describe alternatives you've considered
The [Top 10](https://wordpress.org/plugins/top-10/) plugin has a similar feature: "Exclusions: Exclude posts from select categories from appearing in the top posts list. Also exclude posts by ID from appearing in the list."
Contributor guide
Research direction
Read the linked Top Posts & Pages widget documentation and customization guide, then locate the widget's configuration and post-selection entry points in the Jetpack codebase. Define the category-selection behavior in the settings UI and verify that the displayed top posts are limited to the selected categories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100