Archive for the ‘Wordpress Code’ Category

Changing the Size of the Avatar


20
12
09

The default size of an avatar in a wordpress theme is 32×32px, which is sometime’s a bit small. In my new theme design I want to change it to 60×60px instead.

In your theme, open the comments.php and look for the following code:

1
<?php wp_list_comments(); ?>

This simple line of code has a lot of options available. If you want to learn more about them, just have a look at the WordPress Codex pages. For now, we’ll just concentrate on the size of the avatar.

The way to change the default size is simply by adding some text inside the function, like this:

1
<?php wp_list_comments('avatar_size=60'); ?>

It’s that simple!

Say hello to WordPress 2.9 “Carmen”


20
12
09


The long awaited WordPress 2.9 is finally here. This version is called  “Carmen” on the behalf of honor of magical jazz vocalist Carmen McRae. You can upgrade easily from your Dashboard by going to Tools > Upgrade, or you can download from WordPress.org.

A few of the new features are outlined in the video below.



(more…)

How to create your own WordPress theme


12
12
09

For quite some time I’m working on websites and WordPress themes. As a designer it’s not that hard to ‘draw’ a good design. The real job is turning this great design into a functioning WordPress theme. But no fear,  I´ve found some great tutorials and resources which tell you exactly how!

  1. Designing a WordPress Theme From Scratch
  2. How To Create WordPress Themes From Scratch Part 1
  3. How To Create A WordPress Theme From Scratch (Complete Video Series)
  4. How to Create a WordPress Theme from Scratch – net.tuts
  5. Designing for WordPress: Complete Series & Downloads
  6. Creating a WordPress theme with Dreamweaver – Part 1: Learning the basics

How2 Change wordpress default avatar


05
12
09


Also want to change the default wordpress avatar called Mystery Man? You want to use your own image instaed of it? Follow this tutorial and choose a avatar which is more suitable to your theme.

(more…)

Customize Widgets


03
12
09


Always want to assigns icons to the widgets in the sidebar? I show you how it´s done just by adding a few lines to your theme’s CSS. This tutorial is intended for people with basic XHTML / CSS skills.

Structure
Widget ready themes are built in such a way that each widget acts as an item of a bulleted list. So your sidebar HTML will look something like this:

<ul>
 
	<li id="widget1" class="widget widget_1">Widget1 Content</li>
 
 
	<li id="widget2" class="widget widget_2">Widget2 Content</li>
 
 
	<li id="widget3" class="widget widget_3">Widget3 Content</li>
 
</ul>

(more…)

WordPress Cheat Sheet


02
12
09

A WordPress Cheat Sheets can be very helpful for every WordPress user. Especially if you start working on your own WordPress theme. Or you just want to customize a existing theme. You can find on Google a lot of WordPress Cheat Sheets. But most are outdated, not finished or just too complicated.

If you want to go tweaking the insides of WordPress go and have a look at the Liquidicity WordPress cheat sheet.

The WordPress Help Sheet includes the following:

  • Basic Template Files
  • PHP Snippets for the Header
  • PHP Snippets for the Templates
  • And Extra Stuff for WordPress

Download: WordPress-Help-Sheet

WordPress – functions.php


07
11
09

functions

Functions.php is a little known wordpress template file. Not many themes take advantage of it but , used properly, it can be incredibly powerful. The file can be used as a way to add your own functions to wordpress themes (hence the name).

One of the common misconceptions, at least based upon my experience with a past wordpress tips and tricks post, is that editing functions.php involves changing core wordpress files – meaning there will be issues when you upgrade wordpress.

I am against changing core files in wordpress. This makes upgrading a nightmare.

What functions.php does is let you create functions you can reuse in the theme. It works like a plugin file, being loaded when the theme is first loaded. You can then use the functions inside for anything you choose.  You can also use functions.php as to implement theme control panel pages.

And how do you make use of functions.php? It couldn’t be simpler.

  1. Create a file called functions.php in your theme folder.
  2. Add functions to it.

The file automatically gets included into the theme, you don’t have to do anything.