31
ReBrand WordPress Admin WordPress Meet Up August 2014 By : Chandra Prakash Thapa

Rebrand WordPress Admin

Embed Size (px)

DESCRIPTION

The Re-brand WordPress Admin is for developers who want to give their clients a more personalized and less confusing content management system with amazing look and feel.

Citation preview

Page 1: Rebrand WordPress Admin

ReBrand WordPress Admin

WordPress Meet Up August 2014

By : Chandra Prakash Thapa

Page 2: Rebrand WordPress Admin

Before we start ?

At a minimum, you need to know: WordPress Hooks functions.php

Page 3: Rebrand WordPress Admin

WordPress Hooks?

Hooks allows us to “hook into” WordPress System to retrieve, insert or modify data or perform certain actions, without modifying the core files.

Two types : Actions : Perform Tasks Filters : Manipulate Data

Ref: • http://code.tutsplus.com/articles/the-beginners-guide-to-wordpress-actions-and-filters--wp-27373• http://www.smashingmagazine.com/2011/10/07/definitive-guide-wordpress-hooks/• http://blog.teamtreehouse.com/getting-aquainted-with-wordpress-action-hooks

Page 4: Rebrand WordPress Admin

functions.php

Template.

Acts like a WordPress plugin.

Define functions, classes, actions and filters.

Add features and extend the functionality.

Ref: • http://www.wpbeginner.com/glossary/functions-php/

Page 5: Rebrand WordPress Admin

Modify the Login Logo

Page 6: Rebrand WordPress Admin

Modify the Login Logofunction wpnepal_admin_logo() {

echo '<style>.login h1 a {background-

image:url('.get_template_directory_uri(). '/images/logo.png) !important;

background-size:100%;width:185px;height:58px;

}</style>';

}

add_action('login_head', 'wpnepal_admin_logo');

Ref: • http://diythemes.com/thesis/rtfm/add-image-logo-wordpress-login/

Page 7: Rebrand WordPress Admin

Modify the Login Logo

Page 8: Rebrand WordPress Admin

Modify the Login Logo

Page 9: Rebrand WordPress Admin

Remove Logo from Admin Bar

Page 10: Rebrand WordPress Admin

Remove Logo from Admin Bar

function wpnepal_admin_bar_remove() {

global $wp_admin_bar;

$wp_admin_bar->remove_menu('wp-logo');}

add_action('wp_before_admin_bar_render', 'wpnepal_admin_bar_remove', 0);

Ref: • http://www.staroneweb.co.in/remove-wordpress-logo-admin-bar-pages/

Page 11: Rebrand WordPress Admin

Remove Logo from Admin Bar

Page 12: Rebrand WordPress Admin

Customize the Dashboard

Page 13: Rebrand WordPress Admin

Customize the Dashboard

function wpnepal_custom_dashboard_widgets() { // Quick Press remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // WordPress blog remove_meta_box('dashboard_primary', 'dashboard', 'side'); wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'wpnepal_custom_dashboard_help');}

Ref: • http://codex.wordpress.org/Function_Reference/remove_meta_box

Page 14: Rebrand WordPress Admin

Customize the Dashboard

function wpnepal_custom_dashboard_help() { echo '<p> Your custom message.</p>';}

add_action('wp_dashboard_setup', 'wpnepal_custom_dashboard_widgets');

Page 15: Rebrand WordPress Admin

Customize the Dashboard

Page 16: Rebrand WordPress Admin

Custom admin footer text

Page 17: Rebrand WordPress Admin

Custom admin footer text

function custom_admin_footer() { echo "<p>Powered by : <a href='http://merobox.com/' >MeroBox </a></p> ";} add_filter('admin_footer_text','custom_admin_footer');

Page 18: Rebrand WordPress Admin

Custom admin footer version

Page 19: Rebrand WordPress Admin

Custom admin footer version

add_filter('update_footer','wpnepal_footer_version',11);

function wpnepal_footer_version() { return 'mBox Theme Frameork v1.0';}

Page 20: Rebrand WordPress Admin

Change the Default Gravatar

Page 21: Rebrand WordPress Admin

Change the Default Gravatar

add_filter('avatar_defaults','wpnepal_newgravatar');

function wpnepal_newgravatar($avatar_defaults) {$myavatar = get_bloginfo('template_directory') .

'/images/merobox.png';$avatar_defaults[$myavatar] = "MeroBox";return $avatar_defaults;

}

Page 22: Rebrand WordPress Admin

Change the Default Gravatar[ Go to > Dashboard-> Settings -> Discussion ]

Page 23: Rebrand WordPress Admin

Change the Default Gravatar

Page 24: Rebrand WordPress Admin

Custom Admin Style

Page 25: Rebrand WordPress Admin

Custom Admin Style

function wpnepal_admin_css() {

wp_enqueue_style('admin_css', get_template_directory_uri().'/css/admin.css');

}

add_action('admin_print_styles', 'wpnepal_admin_css' );

Page 26: Rebrand WordPress Admin

Custom Admin Style

/* Custom Amazing Background */#wpwrap{

background-image: url(../images/bk1.jpg);background-size: 100% 100%;

}

Page 27: Rebrand WordPress Admin

Custom Admin Style

Page 28: Rebrand WordPress Admin

Custom Admin Style

/* Text, Heading color */body,h2, #footer-upgrade, #adminmenu div.wp-menu-image:before{

color: #eee;}.hndle, p{

color: #222;}

Page 29: Rebrand WordPress Admin

Custom Admin Style/* Transparent Menu, White color */#adminmenuwrap, .wp-submenu ,.wp-submenu-wrap{

background-color: transparent !important;

}#adminmenu, .wp-submenu ,.wp-submenu-wrap{

background-color: rgba(255, 255, 255, 0.18);

}

Page 30: Rebrand WordPress Admin

Reference[ For more ]• http://code.tutsplus.com/articles/the-beginners-guide-to-wordpress-actions-and-

filters--wp-27373• http://www.smashingmagazine.com/2011/10/07/definitive-guide-wordpress-

hooks/• http://blog.teamtreehouse.com/getting-aquainted-with-wordpress-action-hooks• http://www.wpbeginner.com/glossary/functions-php/• http://diythemes.com/thesis/rtfm/add-image-logo-wordpress-login/ Google.com

Page 31: Rebrand WordPress Admin

Thank You! QUESTIONS?

Chandra Prakash Thapa

@cpthapa

[email protected]