Skip to content

Instantly share code, notes, and snippets.

Grv grvrulz

View GitHub Profile
@grvrulz
grvrulz / admin.css
Created Oct 21, 2015
CSS to change Genesis admin menu icon
View admin.css
#adminmenu li.toplevel_page_genesis a.menu-top div.wp-menu-image:before {
content: "\f0c2";
font-family: 'FontAwesome' !important;
}
@grvrulz
grvrulz / functions.php
Created Oct 21, 2015
New code to change Genesis admn menu icon
View functions.php
function add_my_custom_css() {
if ( is_admin() ) {
wp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css', array(), '4.0.3' );
wp_enqueue_style( 'functions', get_stylesheet_directory_uri()."/admin.css");
}
}
add_action( 'admin_enqueue_scripts', 'add_my_custom_css' );
@grvrulz
grvrulz / functions.php
Created Oct 21, 2015
Old code to change Genesis admin menu icon
View functions.php
function customize_post_admin_menu_labels() {
global $menu;
$menu["58.996"][0] = 'Custom';
$menu["58.996"][6] = 'path-to-custom-image.png'
}
add_action( 'admin_menu', 'customize_post_admin_menu_labels' );
@grvrulz
grvrulz / Contract Killer 3.md
Last active Sep 13, 2015 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@grvrulz
grvrulz / remove_body_class
Created Feb 21, 2014
Remove a particular body class in WordPress
View remove_body_class
function mp_remove_body_classes($classes, $class){
foreach($classes as &$str){
if(strpos($str, "YOUR_CLASS_HERE") > -1){
$str = "";
}
}
return $classes;
}
add_filter("body_class", "mp_remove_body_classes", 10, 2);
You can’t perform that action at this time.