Last active
August 29, 2015 14:25
-
-
Save aobasar/c4789320bd335041102e to your computer and use it in GitHub Desktop.
wordpress back-end branding functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// these changing in themes_folder/function.php | |
// 1. Change the login logo | |
// Important: logo should be at least 323px by 67px. | |
// Here’s the code you’ll need: | |
function login_logo() { ?> | |
<style type="text/css"> | |
body.login div#login h1 a { | |
background-image: url(<?php echo get_bloginfo( 'template_directory' ) ?>/images/logo_login.png); | |
} | |
</style> | |
<?php } | |
// Now that we have the function, we just need to hook it into WordPress using the login enqueue scripts hook: | |
add_action( 'login_enqueue_scripts', 'login_logo' ); | |
// 2. Change the dashboard logo | |
// Important: make your image 20px by 20px. | |
function dashboard_logo() {?> | |
<style type="text/css"> | |
#wp-admin-bar-wp-logo > .ab-item .ab-icon { | |
background-image: url(<?php echo get_bloginfo( 'template_directory' ) ?>/images/logo_admin.png) !important; | |
background-position: 0 0; | |
} | |
</style> | |
<?php } | |
//Hook this into WordPress using the admin head hook: | |
add_action('admin_head', 'dashboard_logo'); | |
//3. Change the footer text | |
function admin_footer () { | |
echo '© Copyright '.date(Y).' Awesome Company'; | |
// echo '<br/>'; | |
// echo 'Page load time: '. timer_stop() . ' and ' . get_num_queries().' queries.'; | |
} | |
//Now to hook it into WordPress you just need the admin footer text hook: | |
add_filter('admin_footer_text', 'admin_footer'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment