Title: [Plugin: admin-only-categories] doesn&#039;t work
Last modified: August 19, 2016

---

# [Plugin: admin-only-categories] doesn't work

 *  [niaxniax](https://wordpress.org/support/users/niaxniax/)
 * (@niaxniax)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/)
 * it doesn’t work

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [lilydustbin](https://wordpress.org/support/users/lilydustbin/)
 * (@lilydustbin)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912082)
 * i just updated it and it stopped working for me too. grrr.
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912167)
 * hi ppl, would you mind telling me what’s wrong with it ?
    i’ll patch it asap,
   but when i test it on different platform it seems to work fine.
 * cheers,
    K
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912170)
 * after a bunch of test everything works fine for me. here’s the process i’ve done:
 * 1. created a user for each role (contributor, author, editor and even subscriber,
   in the case someone allow subscriber with other plugin to post)
 * 2. setup 4 category, 1 for each type + 5 ordinary cat
 * 3. setup in the edit category form the assignment for each role, apart for the
   last 5 categiry that i consider everybody allowed to post in.
 * 4. logged in with each account and verified that every categories that my user
   are allowed to see are rights.
 * everything run clean and fine.
 * did you mess something in that process ?
 *  [lilydustbin](https://wordpress.org/support/users/lilydustbin/)
 * (@lilydustbin)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912185)
 * I get this error in the categories box on the post page:
 * Warning: Invalid argument supplied for foreach() in /nfs/c07/h01/mnt/102706/domains/
   1000acts-of-art.ca/html/wp-content/plugins/admin-only-category/admin-category-
   only.php on line 49
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912194)
 * ok, did you try to set your users rights in the edit-categories panel ?
 * it should solve your problem.
 * by the way, i seems to need to patch the plug to set the option to a kind of “
   allow all” at the plugin registration. thanks for reporting
 * don’t forget to tell me if it works
 * have a nice day
    K
 *  [lilydustbin](https://wordpress.org/support/users/lilydustbin/)
 * (@lilydustbin)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912195)
 * Yes, I did set the user rights and the problem still occured.
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912210)
 * hi lily,
 * just to know, do you use others plugins that may act with categories or user-
   related role ( as wl-members or something ?)
 * i’ve actually test AOC plugin in different environment and it seems to works 
   fine each time, i really have no clue about what’s going wrong ? still searching
   to reproduce the bug, but can’t.
 * i’ve patched the plugin to not act if there’s no assignment in categories, and
   will update it as soon as i found the problem.
 * thanks for your help,
    K
 *  [lilydustbin](https://wordpress.org/support/users/lilydustbin/)
 * (@lilydustbin)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912214)
 * Yes, I use:
 * AVH Extended Categories Widgets
    Register Plus User Role Editor WP-Members
 * I guess there’s a conflict with one of these? There wasn’t before.
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912225)
 * WP-Members seems to be the problem. i’m working on a work around. thanks for 
   sharing,
 * i’ll keep you update,
 * cheers K
 *  [lilydustbin](https://wordpress.org/support/users/lilydustbin/)
 * (@lilydustbin)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912226)
 * Right on. Thank you!
 *  [ollybenson](https://wordpress.org/support/users/ollybenson/)
 * (@ollybenson)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912303)
 * Hi [@kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * Couldn’t get it to work with me, but I made a couple of hacks and it seems to
   work. I’m working on WordPress 3.01 here.
 * Main one was changing how it got capabilities on about line 55…
    `GLOBAL $current_user;``
   $capabilities = $current_user->caps;`
 * Instead of the existing definition of capabilities.
 * The other thing I discovered was that around line 118 it says `can_access` when
   it should be `cant_access`.
 * I’ve also made it not allow you to exclude child categories and hide child categories
   in the secured list as the way WordPress displays categories it shows child categories
   directly beneath their parents.
 * I can send you the code if you want to have a look at it. It’s a really useful
   plugin for what I want, so happy to share.
 * Olly
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912323)
 * hi Olly,
 * sorry for the lack of answer wasn’t home for a couple of days.
    sure, you can,
   as it will help me understand why it works well on some, and don’t for others.
 * here’s my mail [kevin.lanteri@gmail.com](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/kevin.lanteri@gmail.com?output_format=md)
 * thanks for taking some time on this.
    K
 *  Plugin Author [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * (@kevinlanteri)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912337)
 * updated today with olly’s hack. check it twice on different structure, everything
   went fine.
 * [@olly](https://wordpress.org/support/users/olly/) : added co authoring, thanks
   again for your help.
 * cheers,
    K

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘[Plugin: admin-only-categories] doesn't work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/admin-only-category.svg)
 * [admin-only-categories](https://wordpress.org/plugins/admin-only-category/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/admin-only-category/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/admin-only-category/)
 * [Active Topics](https://wordpress.org/support/plugin/admin-only-category/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/admin-only-category/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/admin-only-category/reviews/)

 * 13 replies
 * 4 participants
 * Last reply from: [kevinlanteri](https://wordpress.org/support/users/kevinlanteri/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-admin-only-categories-doesnt-work/#post-1912337)
 * Status: not resolved