filter

jetpack_display_posts_widget_posts_params

Filters the parameters used to fetch for posts in the Display Posts Widget.

Parameters

$args
string

Extra parameters to filter posts returned from the WordPress.com REST API.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

Notes

Thanks to this filter, site owners can control what posts are returned by the Display Posts widget. Here is an example where we only get posts using the “dogs” tag:
function jeherve_test_display_posts_params() {
        return '?tag=dogs';
}
add_filter( 'jetpack_display_posts_widget_posts_params', 'jeherve_test_display_posts_params' );