php - How to check super admin for WordPress multisite? -


i want check super admin in wp_config.php , i've tried following code without result.

if (get_super_admins()) {     echo 'you super admin'; } 

kindly me thanks.

try this:

if ( is_super_admin() ) {     echo 'you super admin'; } 

it not work in wp-config.php user has not been loaded @ stage. there no user check for.

use in theme functions.php file or custom plugin code.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -