This post is guest blogged by Milo of 3OneSeven.com. For all codes, type them out. Do not copy and paste. And here’s part 1.
Tip #6: Add Gravatars Without a Plugin
- Open your comments template and find this line:
<li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>
- After that line, add this set of codes.
comment_author_email)) { $md5 = md5($comment -> comment_author_email); $default = urlencode('PATH to default image'); echo ""; } ?>
- Adjust the path to your default image shown when no gravatar is signed.
Tip #7: How to Add a Side Blog
- Set up the desired category or choose a current one.
- Add the following code to your functions.php file:
<?php
function asidesFilter($query) {
if($query->is_feed || $query->is_home || $query->is_ search) {
$query->set(‘cat’, ‘-17′);
}
return $query;
}
add_filter(‘pre_get_posts’, ‘asidesFilter’);
?>(Notice the number 17 is the category ID number for the chosen category. Yours will be different.)
- Add the following code to your sidebar, assuming you do not work with widgets:
<h3>TITLE
<a href=”FEED URL” title=”The Asides RSS feed.”>
<img src=”RSS IMAGE URL” alt=”RSS” style=”position: relative; left: 0;” />
</a>
</h3><?php query_posts(‘cat=17&showposts=4′); ?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?><div class=”aside_post”>
<?php the_content(‘Continue reading this article’); ?>
</div><?php endwhile; ?>
<span class=”aside_archive_link”>
<a href=”CATEGORY URL” title=”More asides.”>Archives</a>
</span><?php else : ?><p>Sorry, the sideblog is having a little trouble.</p>
<?php endif; ?>
Tip #8: Customizing The Read More Link
- Open your index php or home php file and find this line:
<?php the_content(__(‘Read more’));?>
- replace it with this one:
<?php the_content(“Continue reading ” . the_title(”,”,false), 0); ?>
Tip #9: Customizing The Comments Link
- Open your index.php, archive.php, home.php files and find this line:
<?php comments_popup_link(‘Leave a Comment’, ’1 Comment’, ‘% Comments’); ?>
- Replace it with this one:
<?php comments_popup_link(__(‘No comments on ‘ . the_title(”,”,false)), __(‘One comment on ‘ . the_title(”,”,false)), __(‘% comments on ‘. the_title(”,”,false))); ?>Of course customizing the No Comments text and further is ok too.
Tip #10: Customize the WordPress Login
- Download from /wp-admin/images/ these two images:
login-bkg-tile.gif
login-bkg.bottom.gif - Create two new images with same width and height
- Save them with the same name and file extension (.gif). Of course, you can use other extensions, but then you have to edit the admin.css too to match it.
- Upload it to the /wp-admin/images/ folder
Tip #11: Customize the WordPress Admin
- Download from /wp-admin/ this css file:
wp-admin.css - Admin link colours, find this line:
a {
border-bottom: 1px solid #69c;
color: #00019b;
text-decoration: none;
}Adjust color to your linkings
- Admin link colours, find this line:
a.edit:hover {
background: #ccc;
color: #036;
}a:visited {
color: #006;
}a:hover {
/* border-bottom: 1px solid #3a75ae;*/
color: #069;
}Adjust color to your linkings
- Don’t like Lucida Grande with serifs, adjust this:
body, td {
font: 13px “Lucida Grande”, “Lucida Sans Unicode”, Tahoma, Verdana;
} - Admin top header background:
#adminmenu {
background: #6da6d1;
border-top: 3px solid #448abd;
margin: 0;
padding: .2em .2em .2em 2em;
}
#adminmenu a {
color: #000;
font-size: 14px;
font-weight: normal;
margin: 0;
padding: 3px 5px;
text-decoration: none;
}#adminmenu a:hover, .current {
background: #ddeaf4;
color: #333;
} - Admin second level header background:
#submenu {
background: #0d324f;
border-bottom: none;
margin: 0;
padding: 3px 2em 0 3em;
}#submenu .current {
background: #f9fcfe;
border-top: 1px solid #045290;
border-right: 2px solid #045290;
color: #000;
}#submenu a {
border: none;
color: #fff;
font-size: 12px;
padding: .3em .4em .33em;
}#submenu a:hover {
background: #ddeaf4;
color: #393939;
} - This is just a rough guide for changing link and background colors. No margins or padding were touched. However, when finished, your wp admin can look like this.
From Small Potato
Milo is a graphic and web designer based in Munich, Germany.