• Carol

    (@carolmello)


    Hello, guys.
    I have a problem… ??

    I want remove a capacity of the role = ‘author’ when he write a certain category.
    In the case, i want remove the cap “publish_post” of the author in the category ‘X‘…

    Is possible? How?

    I thought in this code.

    if(in_category('X')){
      $edit_au = get_role( 'author' );
      $edit_au->remove_cap('publish_post');
    }

    But… Nothing. “/

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Do you really wish to prevent any author from publishing any posts in any category in the future should any one author attempt to publish in this one category any one time? Like some kind of penal sentence for bad behavior by one author condemns all authors? This is the logical result as you describe it.

    Or do you simply wish to prevent a particular user-author from using this one category? It seems to me a different approach is in order, unless my first interpretation is correct.

Viewing 1 replies (of 1 total)
  • The topic ‘Specific Category & Capacity/Role’ is closed to new replies.