Fixed layout for admin section

This is still to be confirmed but so far so good: What I did is open all the minified css related to the admin section and deleted theses parts @media only screen and (max-width:xxx px){…} whenever I found one. It seems to work and doesn’t mess with anything else, as far as I know. Of … Read more

WordPress Remove Submenus

Replace all occurrences of $current_user->user_login == ‘username’ with in_array(‘editor’, $current_user->roles). And you can remove the call to get_currentuserinfo(); as for the user information is available from the global variable $current_user. Here’s a code swap: add_action(‘_admin_menu’, ‘remove_editor_submenu’, 1); function remove_editor_submenu() { global $current_user; if(in_array(‘editor’, $current_user->roles)) { remove_action(‘admin_menu’, ‘_add_themes_utility_last’, 101); } } add_action(‘admin_init’, ‘remove_theme_submenus’); function remove_theme_submenus() { … Read more

Dashicons and Pseudo :before

The dashicons are only part of the WordPress admin area. So if you’re aiming for dashicons in the frontend you’ll have to enqueue the icon font within your function.php: add_action( ‘wp_enqueue_scripts’, ‘frontend_dashicons’ ); function frontend_dashicons() { wp_enqueue_style( ‘dashicons’ ); } Moreover you’ll not need to remember those cryptic icon values like \f161; simply add the … Read more

Super administrator db name

The administrator role is defined by the capabilities the user has. Those are stored in the wp_user_meta table for each user. If you’re on multisite, an additional set of capabilities is assigned to a Super Admin. The Codex tells us what capabilities we can check for in code to see if a user is an … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)