Exclude post format(s) from standard Recent Posts widget
-
Is it possible to exclude post formats (not types) from the stock “Recent Posts” widget?
I’ve searched for this, and found a handful of posts on SO and elsewhere (but none here; I searched for ‘”recent posts” widget’ and looked at the first three pages), but they’re all either hand-coding a widget, or excluding based on something else (category, post type, etc.), or have some other difference.
I want to exclude my aside posts from the widget. I don’t want to use a plugin. I would prefer to use the stock widget. Is this possible?
I looked into widget_posts_args, but I’m afraid I don’t understand the documentation. It says the the second parameter is an array of $args, but doesn’t say anywhere what that array can contain. Even the source doesn’t give me any hints, but that’s probably my failing.
The widget_posts_args docs said see also WP_Query::get_posts(), but that source code didn’t do me much more good. It doesn’t seem to reference post formats anywhere, though, so that might be a clue that this isn’t possible. I just want to make sure before I give up.
Thanks in advance.
The topic ‘Exclude post format(s) from standard Recent Posts widget’ is closed to new replies.