Flexible Posts Widget
Add to ListThe default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Posts Widget.
Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.
Features & options
- Customizable widget title
- Get posts by post type(s) and/or taxonomy & term(s) or directly by a list of post IDs.
- Control the number of posts displayed and the number of posts to offset.
- Option to display the post feature image.
- Select the post feature image size to display from existing image sizes: thumbnail, medium, large, post-thumbnail or any size defined by the current theme.
- Order posts by: date, modified date, ID, title, menu order, random, Post ID Order; and sort posts: ascending or descending.
- Each widget’s output can be customized by user-defined templates added to the current theme folder.
- Multi Language support. Compatible with WPML and PolyLang for sure. Not tested with other multi-language plugins, but it should work.
Plugin Hooks
Flexible posts widget currently has two public hooks:
- Filter:
dpe_fpw_args
allows filtering the query vars before submitting the widget posts query. - Filter:
dpe_fpw_template_{$template_name}
filters the template file path used to display the widget output.
Future updates & feature requests list
- Use search box instead of ID text field for post id’s
- Shortcode functionality.
- Get posts by Author.
- Filter out the post currently being viewed.
- Get posts from the same archive (term/post type/etc).
- Limit results by a time period.