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

  1. Open your comments template and find this line:
    <li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>
  2. After that line, add this set of codes.
  3. Adjust the path to your default image shown when no gravatar is signed.

Tip #7: How to Add a Side Blog

  1. Set up the desired category or choose a current one.
  2. 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.)

  3. 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

  1. Open your index php or home php file and find this line:
    <?php the_content(__(’Read more’));?>
  2. replace it with this one:
    <?php the_content(”Continue reading ” . the_title(”,”,false), 0); ?>

Tip #9: Customizing The Comments Link

  1. Open your index.php, archive.php, home.php files and find this line:
    <?php comments_popup_link(’Leave a Comment’, ‘1 Comment’, ‘% Comments’); ?>
  2. 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

  1. Download from /wp-admin/images/ these two images:
    login-bkg-tile.gif
    login-bkg.bottom.gif
  2. Create two new images with same width and height
  3. 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.
  4. Upload it to the /wp-admin/images/ folder

Tip #11: Customize the WordPress Admin

  1. Download from /wp-admin/ this css file:
    wp-admin.css
  2. Admin link colours, find this line:
    a {
    border-bottom: 1px solid #69c;
    color: #00019b;
    text-decoration: none;
    }

    Adjust color to your linkings

  3. 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

  4. Don’t like Lucida Grande with serifs, adjust this:
    body, td {
    font: 13px “Lucida Grande”, “Lucida Sans Unicode”, Tahoma, Verdana;
    }
  5. 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;
    }
  6. 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;
    }
  7. 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.

What's Next?
Related Posts

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

cool site thx first class cheap first class airfares

thanks good replica rolex daytona black mother of pearl

good links thx replica rolex watches

dgdsfg gfdsgdsf gdsfgdsfgds gdsfgds online ticket sales

dfgdf gdfgdsf gdfsgsdf gdfsgdsfg free doctor who ring tones

dfgdsfg gdfgdsfg gsdfgdsfg dsfgdsf gcreate cell phone ring tones

cool site thanks teen tgp

fghdgfjh gsdgs ggjg gdfgds gdf statistics on teen pregnancy

gdfggf sdfd hgfh ghfh gdfd g teen desk

gdfgs dgfh gdsfgdf fgd gdfg dsdgfh xxx lolita

great work great site thanks http://groups.google.us/group/linkmaps bye see you

see this thanks http://google.us/group/steens young preteen in thong lnvwvx

nice thanks man www xtube con

sweet post thx red top tube bye

hi it’s jessy cool site thx :) nexxx videos

wow interesting site thx redtube colm see later

hi great site dude www hq tube

nice site see my 10x pornhube fuck around

cool site 10x

bookmark you thx

hgfhfghf amature free housewife pictures

[…] artigo é uma tradução do artigo Wordpress Tips Part 2, que foi escrito no site WPDesigner.com por Milo, dono do site […]

bookmarked

cool site!

gqcs fjxicmkn hdrli srjupxmnd arehsjg kqigjtlx mriaqjuy

String trimmers

dogs and cats meds

cool post great work thx sectexxvideo

wow cool site dude 10x ;) see u farm animal sex tube

gdfg hgfh hj ggdgfh fghjgf jdf hfg j youpornortgages

3 Add the following code to your sidebar, assuming you do not work with widgets…

it’s doesnt work :(

it’s doesnt work :( its true …

the same about me, didnt manage it..

[…] Comment on WordPress Tips Part 2 by TRuck parts « ? ??????????? ????? ?? ??????????? ??????? 1 ???????? ?? ????? ????? ????? 7 ????? - ?????? ????? ???? ???? ??????? - ??????? ?????? » […]

it’s nice site!

[…] Simple code tips that can help you enhance some basic functions in WordPress http://www.wpdesigner.com/2008/02/01/wordpress-tips-part-2/ […]

cool site!

its rocking!!

Reply
Comment Policy
  • Theme support questions should be posted at the support forums.
  • Name and Email are required. Email is never published.
  • You grant this site perpetual license to reproduce your words and name/website in attribution.
  • Inappropriate comments will be removed at my discretion.
Close
Powered by ShareThis