Tag Info

New answers tagged

0

something like this : https://codex.wordpress.org/Function_Reference/add_role then if ( current_user_can('new_role') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_new_role_uploads'); function allow_new_role_uploads() { $new_role = get_role('new_role'); $new_role->add_cap('upload_files'); }


0

You can also use this : <?php if( current_user_can('editor') || current_user_can('administrator') ) { ?> // stuff here for admins or editors <?php } ?> For detailed reference check this another thread on stack. Thanks



Top 50 recent answers are included