Skip to content

Instantly share code, notes, and snippets.

View kavyagokul's full-sized avatar

Kav kavyagokul

  • Automattic
  • Pune, IN
View GitHub Profile
@kavyagokul
kavyagokul / admin.css
Created October 21, 2015 09:38
CSS to change Genesis admin menu icon
#adminmenu li.toplevel_page_genesis a.menu-top div.wp-menu-image:before {
content: "\f0c2";
font-family: 'FontAwesome' !important;
}
@kavyagokul
kavyagokul / functions.php
Created October 21, 2015 09:38
New code to change Genesis admn menu icon
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' );
@kavyagokul
kavyagokul / functions.php
Created October 21, 2015 09:37
Old code to change Genesis admin menu icon
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' );
@kavyagokul
kavyagokul / Contract Killer 3.md
Last active September 13, 2015 05:58
The latest version of my ‘killer contract’ for web designers and developers

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

@kavyagokul
kavyagokul / remove_body_class
Created February 21, 2014 09:05
Remove a particular body class in WordPress
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);