Skip to content

Instantly share code, notes, and snippets.

@lschatzkin
Created May 23, 2013 19:15
Show Gist options
  • Save lschatzkin/5638665 to your computer and use it in GitHub Desktop.
Save lschatzkin/5638665 to your computer and use it in GitHub Desktop.
how to style wp admin
You make a plugin, then add a wp-admin.css to the folder. Here's some sample code for both the php and the css.
reference: http://codex.wordpress.org/Creating_Admin_Themes
blah-blah-admin-theme.php:
<?php
/*
Plugin Name: Client-Name Admin Theme
Plugin URI: http://techliminal.com
Description: Client-name Admin Theme, styling for the administration screens for Properties
Author: Tech Liminal
Version: 1.0
Author URI: http://techliminal.com
*/
function clientname_admin_theme_style() {
wp_enqueue_style('clientname-admin-theme', plugins_url('wp-admin.css', __FILE__));
}
add_action('admin_enqueue_scripts', 'clientname_admin_theme_style');
add_action('login_enqueue_scripts', 'clientname_admin_theme_style');
?>
wp-admin.css:
#postbox-container-2 h2 {
border: 1px solid rgb(213, 213, 213);
font-weight: bold;
padding: 4px;
}
#postbox-container-2 h3 {
font-size:20px;
}
#postbox-container-2 {
font-size: 12px;
}
#postbox-container-2 label {
clear: left;
float: left;
font-size: 15px;
font-weight: bold;
margin: 7px 0 0;
width: 100px;
}
#postbox-container-2 textarea {
font-size:14px;
width:500px;
margin: -9px 0 0 0;
}
#postbox-container-2 p.col-3 span {
margin: 0 0 0 157px;
}
#postbox-container-2 select {
padding: 2px;
height: 2em;
margin: 8px 20px 18px -14px
}
.admin-chk {
font-size: 14px;
padding: 0 2px 0 10px;
}
.admin-select label{
}
.admin-select p {
float:left;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment