Archive for the ‘WordPress’ Category

WordPress Theme Development 9 – 404 Template

Most of the basic theme template file are explained. We do felt error 404 page, 404.php, is quite important. There is always a chance that user might click on the page that does not exist. If it does happen, proper error 404 page as following will handle it.

WordPress Theme Development 8 – Search Form

There is a new template tag for search form, get_search_form();, in WordPress version 2.7. However, the template tag will look for search form, searchform.php, first. If the file does exists, it will use that file. If not, it will generate the HTML. We decided to use this new template tag. Hence, we will replace the [...]

WordPress Theme Development 7 – Comments

There is an enhancement for comment display in WordPress 2.7. New template tags are introduced. This WordPress theme will be using those enchancement too. In the header file, header.php, code as following is added right before the call to wp_head(); for supporting new JavaScrip functionality with comment threading in WordPress 2.7.

WordPress Theme Development 6 – Theme Functions

The WordPress theme functions file, functions.php, basically acts like a plugin, adding more features to WordPress theme. Currently I added the code as following to this file for supporting widget in dynamic sidebar.

WordPress Theme Development 5 – Sidebar

In the main index template file, index.php, I added sidebar include tag, get_sidebar();. This tag will include the file sidebar.php. Now, I will talk about what information will be included in this file. Your sidebar needs to support dynamic widget sidebar as well as old style sidebar. Hence, <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) [...]

WordPress Theme Development 4 – Footer

Normally, main index template file, index.php, consists of get_header();, posts (the loop) and get_footer();. If footer.php file exists, the code inside this file will appear in get_footer(); section. In footer.php, you might want to show WordPress support by having the “powered by” link in this file. I also include the WordPress version, so that the [...]

WordPress Theme Development 3 – Header

Normally, header.php will start with html doctype declaration, and xhtml namespace. By default, WordPress theme is using XHTML 1.0 Transitional. WordPress function, language_attributes();, will display the language attributes for the html tag. If you want your site supporting XFN (XHTML Friends Network), you can add profile=”http://gmpg.org/xfn/11″ for the header tag. Inside header tag, you will [...]

WordPress Theme Development 2 – Minimum Main Index Template

Let’s talk about index.php template file. This file is a must for WordPress theme. If any file is missing, WordPress will look for this main template file. Currently, I will use these WordPress themes below as references for learning WordPress theme.

WordPress Theme Development 1 – Start with Theme Style Sheet

I decided to develop WordPress theme from scratch in order to learn how the WordPress theme works. This WordPress theme development series is for WordPress version 2.7. Some of template tags that I use only available in WordPress version 2.7. So you might want to modified it to suite other WordPress version. First of all, [...]

Add Gravatar in WordPress Comments

Recently I start using Gravatar (an abbreviation for globally recognized avatar). It is a free service for providing globally-unique avatars which was created by Tom Werner for blogs and web forums. I want to embedded it in my WordPress 2.7 template. So I try to insert the additional code as below in comments.php and it [...]

« Older Posts

Newer Posts »