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 you an idea what apartment I am stay now. I am sharing this apartment with another two co workers. Mum, I am safe. Happy mother day.

Read more...

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() ) : ?> is needed. Next, it will be the search form. I include text input and submit input in the form. I also like to display a list of WordPress pages as links, a monthly archive links list, a list of categories as links and a list of bookmarks as links. Since all the links title does not have any html tag, I will remove both the default before text, <h2>, and default after text, </h2>, by adding empty string for title_after and title_before arguments in bookmark template tag. For meta tag list, I added wp_register(); for displaying either the "Register" link to users that are not logged in or the "Site Admin" link if a user is logged in. Adding some WordPress build-in feeds for allowing your friends to subscribe your blog, which is what I doing too. Lastly, wp_meta(); is added for allowing other WordPress plugin to insert content into this file. An example of this file is stated as following.

Related Posts

References

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, WordPress theme must contains at least two files, which are style.css and index.php. This style.css is the theme main style sheet. It must consists your theme information such as below at the beginning of the file. Cascading Style Sheets (CSS) information will be added at later state. More info on index.php will be explained next.

Read more...