Archive for October, 2005
Sunshine on a cloudy day
“Sunshine on a cloudy day” is the name of my newest WordPress theme. I made this for my Japanese site and then added some minor changes and uploaded to this site. I changed the header image a little to distinguish these 2 sites.
I don’t know about PHP and sometimes find difficulty with English, but I created this based on “Almost Spring” theme from Becca with informations of WP support forum and codex.
First, I created home.php for my HOME, and 5 category templates as category-x.php(x is the category ID) for my 5 main categories, “Daily Life”, “Web”, “Languages”, “Travel” and “House”. Each category has some child categories that follows the category.php that shows the posts as title list. I use Custom Query String plugin to show the different numbers of post titles from category templates.
In home.php, I use 2 Loops, 1 is for “Latest Updates” and the other for “Announcement” with query post, and the other posts (those on sidebar and message with welcome photo) are shown with the plugin wordpress asides coldforged style. I am using 2 loops because I wanted to have “NEW!” with the new posts.
<?php if ((time() - get_the_time('U')) / (60*60*24) < 3)
{ echo "<font color=\"#dd0000\"><small>NEW!</small></font>"; } ? >
With this code above, “NEW!” will be shown with the posts posted within 3 days with colored (#dd0000) small font. Thanks sasa for this useful trick.
I only included 5 main categories and their child categories in the “Latest Updates” on HOME. To make this possible, I use the plugin Front Page Categories that also can exclude categories.
You are currently browsing the hyperpup blog archives for October, 2005.