Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/akashbhowmik54/post-filterer-plugin/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Filter and display WordPress posts based on view count, recency, or number of comments. Includes both a widget and shortcode for flexibility.
Description
Post Filterer allows you to display filtered lists of posts using either a widget or a shortcode. You can filter posts by:
- Recent posts
- Popular posts (based on view count stored in custom field
views) - Most commented posts
Features:
- Widget support (with title, filter type, and number of posts)
- Shortcode support:
[post_filterer type="popular" posts="5"] - Lightweight and easy to use
- Developer-friendly (uses namespaced PHP classes)
Installation
- Upload the plugin files to the
/wp-content/plugins/post-filtererdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress.
- Use the Post Filterer Widget from the Appearance > Widgets screen.
- Or use the shortcode
[post_filterer type="recent" posts="5"]inside any post, page, or template.
Frequently Asked Questions
What filter types are supported?
You can choose from:
recent: Latest postspopular: Posts with the highestviewsmeta keycomments: Posts with the most comments
Where does the view count come from?
You need a plugin or custom code to store post views in a custom field named views.
Can I style the list?
Yes. The output is wrapped in a <ul> with class wzpfil-post-list. You can style it using custom CSS.
Changelog
1.0
- Initial release with shortcode and widget support.
Upgrade Notice
1.0
First release – no upgrade needed.
Screenshots
- Widget configuration
- Shortcode output on the front end