apply_filters ( 'jetpack_widget_authors_exclude', array $default_excluded_authors )

Filter authors from the Widget Authors widget.

Source file: modules/widgets/authors.php

View in GitHub

Parameters

$default_excluded_authors

(array) Array of user ID’s that will be excluded


Changelog

Since: Jetpack 4.5.0


Notes

You can use this filter to exclude specific authors from ever appearing in the Authors Widget. In the example below, the author matching ID 5 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.

Comments

  1. Ben Potter says:

    Where do I add this code?

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s