Add a role and give admin priviledges

I am creating a Super Admin role in wordpress Roles.

$capabilities=array(); add_role('Administrator', 'Administrator', $capabilities );  add_role('Super Admin', 'Super Admin', $capabilities) );  

So while adding a new user I got the Role Option Super Admin. So I added a Super User .

Now When I login to wp-admin It gives me error saying:

you do not have sufficient permissions to access this page.

What more I have to do to make it work. I dont want to use any pluggin.

I tried this too

add_role('Super Admin', 'Super Admin',  array("manage_network","manage_sites","manage_network_users", "manage_network_plugins","manage_network_themes","manage_network_options", "read") );  

and

  add_role('Super Admin', 'Super Admin', array("manage_network"=>true,"manage_sites"=>true, "manage_network_users"=>true,"manage_network_plugins"=>true, "manage_network_themes"=>true,"manage_network_options"=>true,"read"=>true) ); 

I want this user to access all stuff in wp-admin panel

Replay

Check below threads. Hope this will help you.

https://codex.wordpress.org/Roles_and_Capabilities

https://managewp.com/create-custom-user-roles-wordpress

Category: users Time: 2016-07-29 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.158 (s). 12 q(s)