Home / admin / Block admin for all users but administrator
  • kachan64

    I want author to be able to access to that page instead of just an admin (I know the code, but needs help appending it). Also is it possible to only access posts and media only?

    • if you look at current_user_can and change the capability to something else if will allow other roles to access. View this page on wordpress codex to see what can be done,

      • kachan64

        Thanks. Is there a code that can append admin Like “if admin and author can” or something like that?

        • anything an author can an admin can so allowing authors will also allow admins.

  • Wouldnt this block ajax that uses no_priv or any type of ajax?

  • Nicolas

    Thanks for sharing ! Awesome snippet but it cause problem with ninja form plugin when you want to sent an email ! Any tip for that ?