Archive for May, 2009

Away From Tobacco; Promote Healthy Lifestyle; Care For Environment

What I like in China, not just in Beijing, I can see lots of nice motto, such as this one (远离烟草,崇尚健康,爱护环境). It means ‘away from tobacco; promote healthy lifestyle; care for environment’. Hmm. I believe everyone should start doing it now including me. He He. Tonight, I should eat more healthy food and reduce clubbing [...]

Live Without Phone

When I was at The Place (世贸天阶) in Beijing, I saw these nice sculptures. I felt city people can’t live without mobile phone nowadays.

Getting a Sling Bag

I regret for not bring my sling bag to Beijing. I need a bag to keep my umbrella, a bottle of water and a camera. I am thinking for getting a new one here. Where to get it? After a morning walk around the area near my apartment, I saw a new shop called “Faya [...]

Mum, Happy Mother Day

Although I am very tired now, I need to complete this small task before I go to bed. I need to take some pictures of my current stay in Beijing for showing my parents that I am safe and staying in a comfortable place. Sorry mum. I did not call earlier. Below pictures will give [...]

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 reader [...]

« Older Posts