Filters in Jetpack to customize subscription delivery


Filters in Jetpack to customize subscription delivery.

Three filters have been made available since version 3.7 that allows you to customize which posts get emailed to your subscribers. To do so, you would need to add the code to a functionality plugin or directly to your theme’s functions.php file.

1. jetpack_allow_per_post_subscriptions: Option to toggle email delivery on a per-post basis.

  • Filter: jetpack_allow_per_post_subscriptions
  • Will add a checkbox option to every new post of whether or not to email the post to subscribers.
  • Example usage: wp-content\plugins\jetpack\modules\subscriptions.php


After change:

Using filters in Jetpack to customize subscription delivery


2. jetpack_subscriptions_exclude_these_categories: Exclude certain categories from ever emailing to subscribers.

  • Filter: jetpack_subscriptions_exclude_these_categories
  • Will never send subscriptions emails to whatever categories are in that array
  • Example usage: wp-content\plugins\jetpack\modules\subscriptions.php



3. jetpack_subscriptions_exclude_all_categories_except: Exclude all posts from emailing to subscribers, except ones in these categories.

  • Filter: jetpack_subscriptions_exclude_all_categories_except
  • Will never send subscription email for posts, UNLESS the post in in one of these categories.
  • Example usage: wp-content\plugins\jetpack\modules\subscriptions.php


A note about these filters:

  • These filters are not meant to be used together. Only one should be used at a time. They will override each other and it will be awkward.
  • If either of the category filters are set, then the per-post checkbox will not display no matter what.


Thanks for watching!


About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

Comments are closed.

%d bloggers like this: