Archives

Windows 10 Essential Software for Web Development

windows-10-setup

So, last month I bought a new laptop. I actually bought two laptop. The first one is an Acer laptop. Use it for a week, not very happy with it. So I bought Asus.

I spent several days to set up and install the laptops. I think it’s a good idea to documented it here.

I hope this post will be useful for folks who want to do web development in windows.

Read More Windows 10 Essential Software for Web Development

Responsive Image In WordPress 4.4 (Testing, Thoughts, etc)

wordpress-4.4-responsive-image-test
Let the browser decide which image size to display !

So, I did some test for WordPress 4.4 beta3 new feature: Responsive Images. And it will make your content retina ready automatically! Awesome.

Not only that, it will also serve smaller image to low res device and it will make your site load faster to the less capable mobile device. Read More Responsive Image In WordPress 4.4 (Testing, Thoughts, etc)

How to Create Sortable Checkboxes Option in Customizer

Customizer-Sortable-Checkboxes

WordPress Customizer is a very powerful. Not only because we have a live preview, but also because it got a lot of build-in input type. And we can also extend it or create our own reuse-able input type.

This is not a full tutorial but only explaining the concept, but you can check the full working code here:

This is a useful control, we can use it for various settings for example:

  • Reorder element, such as header, navigation menu, thumbnail, excerpt, etc.
  • Sharing buttons.
  • etc..

Read More How to Create Sortable Checkboxes Option in Customizer

How To Disable WP.org Theme Update Check

WP.org is not very good (read: evil) organization. They collect data without user consent, they are not transparent in what data they collecting, and they make it hard to disable this.

For example: There’s no easy way to exclude custom theme for update check. WordPress have filters for everything, but they don’t have this filterable. Maybe they want to monopolize theme market (maybe they are trying to say: you want to create theme? you need to use wp.org theme repository).

The only way to disable theme update check to wp.org repository is using this code (well, it’s pretty much a hack): Read More How To Disable WP.org Theme Update Check

How to Load Multiple Google Fonts in One URL Request

Loading google font is easy. If we visit Google Font page, for example Open Sans Font. we can see the instruction to add the font in our web page.

google-fonts-instruction
Google Fonts Instruction

If we need to load multiple font weight (for example 400 (normal) and 700 (bold), we can use this pattern in the URL Font+Name:400,700. For example:

//fonts.googleapis.com/css?family=Open+Sans:400,700

So font name is separated using + sign. and we can add multiple font weight/style using : after font name and add available font weight/style in comma , separated string,

I remove the http: part of the URL when loading it, so it will be HTTPS compatible, and using the right protocol when loading the font.

If we use more than one font, we can simply load it in separate request, for example we use Open Sans and Ubuntu Font.

<link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic' rel='stylesheet' type='text/css'>

Multiple Google Fonts in One URL

But of course we want to reduce the number of HTTP request. We can actually load multiple Google Fonts in one URL request like this: Read More How to Load Multiple Google Fonts in One URL Request

Building a Starter Theme

I love using Hybrid Core Framework, I use it in all my themes, I don’t even know how to build a theme without it. Currently Justin is working on the Version 3 of the Framework and it’s offer a lot of improvement and features.

I want to create my own.
nokonokoHybrid Core is modular and extendable so I can use only the features I need and bend it as I see fit, but I want to create my own framework so I can have full control of the features and code. For my themes I created “Tamatebako“, a Hybrid Core sidekick to build theme faster by setting the defaults. Now I want to experiment and make Tamatebako as a standalone framework.

The focus is a little different than Hybrid Core. Instead of building new awesome features, the focus is for faster theme development. I might failed and switch back to Hybrid Core, but I think it’s going to be a good opportunity to dive in and re-learn about theme development.

I haven’t even done porting main framework features (still a mess), but you can follow the development here.