Hi,
To create notifications for posts in certain categories only, you can add this to your theme’s functions.php file:
add_filter('wnbell_restrict_post_term','restrict_post_category',10,2);
function restrict_post_category($allowed, $post_id){
$categories = array('Some category', 'Another category');
$post_categories = wp_get_post_categories( $post_id, array('fields' => 'ids') );
$allowed = false;
foreach($categories as $category){
$cat_id = get_cat_ID($category);
if(!$cat_id) continue;
if(in_array($cat_id,$post_categories)){
$allowed=true;
break;
}
}
return $allowed;
}
and replace this with your categories:
$categories = array(‘Some category’, ‘Another category’);
For the custom post types, I’m not sure what you mean. I can’t test with this theme but let me know if there’s something I should fix.