Source file: modules/subscriptions.php
View in GitHubParameters
- $args
-
(array) Array of category slugs or ID’s.
Changelog
Since: Jetpack 3.7.0
Notes
Sometimes, you want to exclude a series of posts from Jetpack Subscriptions. You can do so thanks to the jetpack_subscriptions_exclude_these_categories
filter. You can use that filter to exclude one or more categories.
In the example below, we exclude all posts belonging to the “VaultPress” and “Akismet” categories:
function jetpackme_exclude_posts_subscriptions( $categories ) { $categories = array( 'vaultpress', 'akismet' ); return $categories; } add_filter( 'jetpack_subscriptions_exclude_these_categories', 'jetpackme_exclude_posts_subscriptions' );