After adding this code, no posts are pushed to discord. I’ve tried both a singular category and multiple categories in an array. When I remove the code, all posts are pushed.
I’ve tried this code in both the theme functions.php file as well as using the “Snippets” plugin.
For a member’s only site, adding the ability to select which categories are pushed to discord from within the dashboard settings would be very helpful.
function wp_discord_post_limit_by_category( $current, $post ) {
if ( has_category( array( 'Staff Only', 'Members Only' ), $post ) ) {
return false;
}
return $current;
}
add_filter( 'wp_discord_post_is_new_post', 'wp_discord_post_limit_by_category', 10, 2 );
The above code doesn’t seem to be working for me. Posts in the excluded categories are still being pushed to Discord.
Please add a checkbox list of categories in the Plugin Settings. For a member’s only site, adding the ability to select which categories are pushed to Discord from within the dashboard settings would be very helpful.