WordPress.org

Ready to get started?Download WordPress

Forums

Hide sub menu on specific usernames (1 post)

  1. rize
    Member
    Posted 2 years ago #

    I'm using the following code:

    function delete_submenu_items() {
    	if ( current_user_can( 'editor' )) {
    		remove_submenu_page( 'themes.php', 'theme-editor.php');
    	}
    }
    add_action( 'admin_init', 'delete_submenu_items' );

    But instead of having it on 'editor' role how do i make it work only on specific username i created?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.