Skip to content

Instantly share code, notes, and snippets.

@jeherve jeherve/plugin.php
Last active Mar 25, 2016

Embed
What would you like to do?
[Jetpack] Exclude certain categories from Jetpack Subscriptions
<?php
/*
* Plugin Name: Exclude the asmodeus category from Jetpack Subscriptions
* Plugin URI: http://wordpress.org/plugins/jetpack/
* Description: Exclude the asmodeus category from Jetpack Subscriptions
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
function jeherve_sub_exclude_cat() {
if ( in_category( 'asmodeus' ) ) {
return false;
}
}
add_filter( 'jetpack_is_post_mailable', 'jeherve_sub_exclude_cat' );
@uamv

This comment has been minimized.

Copy link

uamv commented Jun 29, 2015

Are subscriptions no longer run through this filter?

@R3IDV3

This comment has been minimized.

Copy link

R3IDV3 commented Mar 24, 2016

In case anyone stumbles across this gist, this is the current solution: https://jetpack.com/support/subscriptions/#filters

@jeherve

This comment has been minimized.

Copy link
Owner Author

jeherve commented Mar 25, 2016

@R3IDV3 That's correct. We now use different filters.

@uamv I'm sorry, I didn't see your reply before. Gist doesn't seem to send out comment notifications...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.