[Plugin: Post Notification] Post-notification plugin: exclude categories from user selection
-
Post-notification plugin
To prevent users from selecting categories that the site admin doesn’t want them to subscribe to:– In ‘post-notification’ folder, open file ‘functions.php’
– Find line #294:
? ? ? ? $cats = get_categories(array('hide_empty' => false));
– Replace by:
? ? ? ? $cats = get_categories(array('exclude' => 'X,Y', 'hide_empty' => false));
– Then find line #296:
? ? ? ? $cats = get_categories();
– Replace by:
? ? ? ? $cats = get_categories(array('exclude' => 'X,Y'));
where ‘X’ and ‘Y’ represent the ID numbers of the categories you want to exclude, separated by a comma — check your categories’ ID# at https://your_domain/your_wordpress_folder/wp-admin/categori… –; sort your excluded categories’ ID# in ascending order.
- The topic ‘[Plugin: Post Notification] Post-notification plugin: exclude categories from user selection’ is closed to new replies.