• AliceG

    (@aliceg)


    Hello,
    this pluggin doesn’t seems to work, or maybe I made a mistake ?
    I have last plugins and wordpress instal, also, I created my own roles for reading, with :

    function custom_roles() {
      global $wp_roles;
      add_role(
        'role_inter',
        __('Interne'),
        array(
              'read'         => true,
              'edit_posts'   => false,
              'delete_posts' => false,
          )
      );
      add_role(
          'roles_free',
        __('Freelance'),
        array(
              'read'         => true,
              'edit_posts'   => false,
              'delete_posts' => false,
          )
      );
      add_role(
          'role_externe',
        __('Externe'),
        array(
              'read'         => true,
              'edit_posts'   => false,
              'delete_posts' => false,
          )
      );
    }
    add_action('after_setup_theme', 'custom_roles');

    Is it a problem if the role is not from the core?
    I really have to restrict categories for 2 different kind of readers, does someone can teach me?
    Thank you a lot ??

    https://www.ads-software.com/plugins/restrict-categories/

  • The topic ‘doesn't seems to work…’ is closed to new replies.