Filter authors from the Widget Authors widget.
Parameters
- $default_excluded_authors
array Array of user ID's that will be excluded
Changelog
- Introduced in Jetpack 4.5.0
How to use this hook
Notes
You can use this filter to exclude specific authors from ever appearing in the Authors Widget. In the example below, the author matching ID5 will be excluded:
/**
* Exclude specific authors from ever appearing in the Authors Widget.
*
* @param array $default_excluded_authors Array of user ID's that will be excluded.
*/
function jeherve_exclude_authors_widget( $default_excluded_authors ) {
$default_excluded_authors[] = 5;
return $default_excluded_authors;
}
add_filter( 'jetpack_widget_authors_exclude', 'jeherve_exclude_authors_widget' );
To find out the ID of each author you’d like to exclude, you can go to the Users menu in your dashboard, and click on an author’s name to edit their profile: their profile editing page URL will include the author ID.