J.me

Refreshing blog, new design and new domain

It has been a while since the last time I change the design of this blog, it is almost three years ago. The web landscape has been changed rapidly since then, with HTML5 becoming more standard and CSS3 is more supported, that made my old design outdated. So the thought came to me, it is the time for a new design.

blog-redesign1

Also with this opportunity, I also introduced a new domain for this blog, jeffri.me. Starting today, jeffri.me is the default domain for this blog, while my old domain – jeffri.net – will redirect to this new domain. In case you are wondering, why did I change a dot net to dot me, well, no specific reason. I just feel like it, it’s shorter by one letter and it’s more personal. ย ๐Ÿ™‚ย Besides, it’s not like my old domain ranked high, although it’s 5 years old now. I will keep jeffri.net for as long as I live though.

Sort by latest post for wp_list_categories

One of my developer friend asked me if we could sort by last post using wp_list_categories function for WordPress. By default, wp_list_categories accept arguments for order by ID, name, slug, count or term_group. Order by latest post is not possible by default, but with a little of tweak using filter hook, we can. ๐Ÿ™‚

First, we’ll looking at the function wp_list_categories. This function made call to get_categories to get the list of categories, which made another call to get_terms. Categories in WordPress is basically terms with category taxonomy. Finally, looking on the get_terms function, we will find some delicious filter hook that suitable for our customization.

Blog successfully updated to WordPress 3.2

Here is another major update from WordPress. Now, this blog has been successfully updated to 3.2. Thanksfully, nothing need to be changed in the theme. ๐Ÿ™‚

A lot of changes has been made for this version, and one that is noticeable is the new look and layout for the administration area. It looks a little better. The sidebar is changed. The color of the boxes also changed a bit, it is more light. Some fonts are also changed. Overall, I liked the new look. ๐Ÿ˜‰

There’s no yet compatibility issue so far is all that I can tell.

WordPress Snippets part 1

Well, this will be a short list of WordPress snippets that we could use. This snippets is collected from my daily work on WordPress and should be useful for daily basis.

WordPress mail snippets

WordPress has its own improved function for sending email, it is wp_mail. We should always use this function if we wanted to send email within WordPress. With this function, we don’t need to worry much about the mail header and stuff. More over, there is plenty of filter we can use to customize it.

Customize Custom Post Type Landing Page with Clean URL

WordPress has been long capable on using custom post type. Since WordPress 3.0, we are now easier to create a custom post type. I have blogged some tips about it.

However, many didn’t know that the custom post type already had it’s own landing page, though, you will need to pass the post type variable to the URL. This post will guide you to the step by step on customizing the post type landing page, as well as adding a new rewrite rule for a cleaner URL.