WordPress functions.php tricks: Disable image compression

WordPress automatically compresses JPEG images at 90% quality. In this article, I will show you how to increase or decrease WordPress JPEG image compression. All you need to do is paste the following code in your theme’s functions.php file or your site-specific plugin. Setting it to 100 would mean that WordPress would compress the image at its highest quality. For most users, this is not an issue. Heck, we never noticed it on our site. But if you are a photographer, then this is noticeable (we suppose). There are definitely performance benefits to leaving the compression quality as is. If...

Cufon - Fonts for the people

Cufon text does not appear in Internet Explorer

In case you encounter any problems with your site's cufonized fonts try to update you rendering engine to the latest version. On October 24 they released released version 1.09i, which is the same as 1.09 but IE9-compatible. Keep in mind that you do not need to convert your font generated files again, just replace your old cufon-yui.js with a new one and you're good to go.

twitter bug

Twitterizer: Solving the 401 bug when calling "GetAccessToken" or "GetRequestToken"

I recently encountered a strange bug using the Twitterizer API. I couldn’t call “GetAccessToken” without getting a 401 error. After searching about it, I found out that other people encountered the same bug by calling the “GetRequestToken” method (see more info here).  The correct way to get an access token using the twitterizer API is using the following source code sequence: The source code above may crash on the last line. The bug is probably caused by wrong timestamps, Twitter is sensitive to server time inaccuracies. The rash of issues lately is apparently caused by the clocks on Twitter’s servers being...

magento logo

Magento: List categories which have the option "Include in navigation menu" set to "No"

The following source code came in handy for me, when I decided I wanted to show only the top level category in the top navigation menu of a magento store, and only show the child categories in a page whenever the top level category is clicked. This is very useful if one of your top categories contains a lot of subcategories, that will create a giant list in the drop-down menu when the visitor hovers over it. First you have to set the sub categories as active in the magento administrator panel, but the option “Include in navigation menu” should...