Remove menu items for non admins

function TRIM_ADMIN_MENU() { global $current_user; if(!current_user_can(‘administrator’)) { remove_menu_page( ‘tools.php’ ); // No tools for <= editors remove_menu_page( ‘activity_log_page’ ); // Activity log } }...

Add Script to WordPess Header

function my_custom_js() { echo ‘<script src=”https://wchat.freshchat.com/js/widget.js”></script>’; } // Add hook for admin <head></head> add_action( ‘admin_head’, ‘my_custom_js’ ); // Add hook for front-end...

Remove Admin Menu Items

function remove_menus(){ remove_menu_page( ‘index.php’ ); //Dashboard remove_menu_page( ‘edit.php’ ); //Posts remove_menu_page( ‘upload.php’ ); //Media remove_menu_page( ‘edit.php?post_type=page’ ); //Pages...

Pin It on Pinterest