Opened 10 years ago
Last modified 6 years ago
#31085 new enhancement
CPT selector to “Recent Posts” widget
Reported by: | sippis | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Widgets | Keywords: | has-patch 2nd-opinion needs-refresh |
Focuses: | Cc: |
Description
I think that "Recent Posts" widget should support selection to show all posts or only in selected CPT.
Attachments (1)
Change History (5)
This ticket was mentioned in Slack in #core by sippis. View the logs.
10 years ago
Note: See
TracTickets for help on using
tickets.
My first patch, be nice :p
Selector is displayed only if there is post types that are not built in and those are public, it defaults to 'post' and also allows to choose that or 'any' alongside CPT's.
Patch contains two new filters;
widget_posts_cpt_args
to change arguments passed forget_post_types
widget_posts_cpt_selector
if false, selector will not be displayedYes, most of users probably will not need this functionality and will get confused when they see it. However, as a developer, it's annoying to invent the wheel again every single time and make own widget for this functionality when there is already good basic widget for recent posts.