Here are a few snippets that we think will help you, while working on your next web project. This is another addition to our snippets section where we post life saving hacks (at least we think they are life saving).
Display your Facebook fan counts
function count_fb_fan($fb_name){
$data = json_decode(file_get_contents(
return $data->likes;
}
Theme your WP Admin area
First create custom CSS for whole admin area and place it in your theme folder
Then copy paste following lines of code in functions.php
function wp_adminCSS() {
echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/wp-admin.css"/>'; }
add_action('admin_head', 'wp_adminCSS');
Change Logo on wp-login.php
<?php function
change_login_logo() { ?>
<style type=
"text/css"
>
.login #login h1 a {
background-image: url( '<?php bloginfo('template_url'); ?>/
logo.png'
);
}
</style>
<?php }
add_action(
'login_enqueue_scripts'
,
'change_login_logo'
);