What code do I remove to stop Add Category from displaying?

WP 3.1.2

Hi, what code do I delete so that "Add Category" doesn't display in Products and Products>Create New?

(I used menu editor to restrict access to Categories but sub stores can still add to them through the Products page.)

Thanks.

  • DavidM
    • DEV MAN’s Mascot

    Hi sdominique,

    I was trying to find some effective way of achieving that but unfortunately, that’s having to do more with the way WordPress handles custom post types.

    If you take a look at the Screen Options pull-down tab at the top right area of the Product editing screen (it’s there in the regular post/page editing screen t0o) you’ll notice some options where you can select to remove the Categories module.

    If there were a way to force that item to be un-ticked and remain so, that could effectively achieve what you’re asking, but I’m not aware of any way to do that.

    I’ll ask a few folks around here if they might know some way to do it though, it would be nice as a plugin itself too, something that could restrict/force those options, perhaps something for the Membership plugin.

    Cheers,

    David

  • DavidM
    • DEV MAN’s Mascot

    Oh I see, I thought you were looking to get rid of that entire module. Actually, all you really need is to limit the ‘manage_categories’ capability. I think you’ll be able to do exactly that with the User Role Editor plugin.

    http://wordpress.org/extend/plugins/user-role-editor/

    There’s an option to have the roles/capabilities applied network wide, pretty incredible feature really. And with that you could just ensure the manage_categories capability is removed for your Site Admins, etc.

    Cheers,

    David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.