Feb.01.2008
WordPress Tips Part 2
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.
- 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. Read more about this author.


Hi, love the Quadruple Blue Template! Is it possible to put a 728×90 leaderboard at the top of my blog in this template? If so , how? Thanks in advance.
Hey Mike - It is possible, but you’ll need to find out how to do it. I’m not trying to be a jerk. I do offer support, but not for modifications and customizations. Also, please post off topic comments at the forums. Thanks Mike.
This is awesome. Where would I find the functions.php file please (reading the tutorial on how to add a sideblog)?
That file would be in your theme’s folder.
[…] Wordpress Tips Part 2 […]
Just wondering what are your reasons for sugegsting to add gravators without using a Plugin?
There’s more than one way to integrate and I think Milo just wanted to show you how to do it without a plugin.
Right, there are more ways how to integrate gravatars/avatars with or without plugins.
Generally speaking: the less plugins to load the less loading time = better performance.
[…] to WordPress development over the last year, so be sure to check out WordPress Tips Part 1 and Part 2 and browse around for some other great information. No Comments, Comment or […]
[…] WordPress Tips Part 2 (tags: wordpress) […]
[…] Ajouter des gravatars afin que vos visiteurs puissent laisser leur photo en face de leurs commentaires juste par l’url de leur blog : How to add Gravatar […]
Hi,
I like the idea of using gravatars without plug-in!
But i’ve got one question about the code:
Do i have to put the full path to the default image in or can i somehow use something like php bloginfo(’template_url’) ?
template_url is fine.
Thanks, i’ll give it a try!
Can i use
urlencode( template_url ‘images/default.png’ ); ?
I’m a bit of a php beginner. :-/
urlencode? i have no clue.
[…] 1 - WPDesigner » WordPress Tips Part 2 […]
[…] original source from gravatar integration Tip #6: Add Gravatars Without a Plugin from WPDesigner by […]
Hi
Wasjust serfing on net and found this site…want to say thanks. Great site and content!
the gravatar are too small, i would like to try to modify it become bigger
I9lLwp Hi! Nice site! Where is a add to favorite button&
http://www.mysite.com
please look at this
hay cheap ativan 7342
it’s nice site!!! diazepam addiction brwl
it’s nice site!!! purchase lipitor 39764
hello everybody! purchase propecia =-PP
please look at this valium online olmvi
please look at this order xanax 96672