Support » Plugin: Members - Membership & User Role Editor Plugin » Does not hide Elementor Templates

  • Resolved silentmedia

    (@silentmedia)


    Hi,

    Great Plugin – Thank you.

    I need to hide most of the Admin menu options for the Editor role.

    But I can not hide ‘Tools’ and ‘Templates’ (Elementor) from Admin sidebar. No option in Custom either.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @silentmedia

    You can add this code at the end of your theme’s functions.php file:

    add_action( 'admin_menu', 'members_remove_menu_pages' );
    function members_remove_menu_pages() {
      $user = wp_get_current_user();
      if ( in_array('editor', $user->roles) ) {
        remove_menu_page('tools.php');
      }
    }

    I don’t know what is the Templates slug in Elementor so you’d need to add it yourself.

    Best

    Thread Starter silentmedia

    (@silentmedia)

    Thank you for your support. Much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.