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
- Introduced in Jetpack 3.6.0
How to use this hook
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' );