Skip to content

Instantly share code, notes, and snippets.

@johnmorris
Last active November 13, 2015 22:16
Show Gist options
  • Save johnmorris/db75b38afff544e91f43 to your computer and use it in GitHub Desktop.
Save johnmorris/db75b38afff544e91f43 to your computer and use it in GitHub Desktop.
How to Create a Custom WordPress Admin and Login Theme
<?php
/*
Plugin Name: Awesome Admin
Plugin URI: https://www.youtube.com/watch?v=ofPWdC9U7A&list=PLrG78JjvL7hXpxdunxZSb037-ZpYBdxw6
Description: Dummy plugin for tutorial on creating a custom admin theme
Author: John Morris
Version: 1.0
Author URI: http://johnmorrisonline.com
*/
function awesome_admin_theme_style() {
wp_enqueue_style('awesome-admin-theme', plugins_url('css/wp-admin.css', __FILE__));
}
function awesome_login_theme_style() {
wp_enqueue_style('awesome-login-theme', plugins_url('css/wp-login.css', __FILE__));
}
add_action('admin_enqueue_scripts', 'awesome_admin_theme_style');
add_action('login_enqueue_scripts', 'awesome_login_theme_style');
/** Admin Page
--------------------------------------------------------------------------------------------------------------------- */
html {
background: #aad8ed;
}
#adminmenu,
#adminmenu .wp-submenu,
#adminmenuback,
#adminmenuwrap {
background-color: #0073aa;
}
.wrap>h1, h2 {
color: #23282d;
}
/** Login Page
--------------------------------------------------------------------------------------------------------------------- */
body,html {
background: #aad8ed;
}
#login {
width: 500px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment