Using Post Thumnails with WordPress 2.9

Probably like many others who dabble with WordPress, I was excited to read about the new post thumbnail support in WordPress 2.9. Of course, after upgrading, I could not figure out how to use them – only to discover that the feature is disabled by default. I finally discovered how to turn the feature on, and here is how you can do it to.

Edit the functions.php file that came with your favourite theme, and add the following:

if (function_exists('add_theme_support'))
      add_theme_support('post-thumbnails');

The if statement checks to see if we actually can use the add_them_support() function, so we do not break our themes compatibility with versions of WordPress prior to 2.9. Save the file, and you can simply set the post thumbnail in the back end.

Update: Mark Jaquith, a lead developer on the WordPress Personal Publishing System, has written a very comprehensive post on his blog on the recommended way to use this feature in a theme. It is clear and explains the official WordPress Way to do this. Definitly a must read.

Call to undefined function ctype_digit() in /wordpress/wp-admin/includes/file.php on line 238

After upgrading to WordPress 2.9, self-hosted WordPress installations may receive this error:

Call to undefined function ctype_digit() in /wordpress/wp-admin/includes/file.php on line 238

When trying to use either the Flash uploader or the browser uploader to upload new media to WordPress, or when trying to save a new post as a draft, post it and so on. This happens because PHP on your host has not been compiled with ctype support. Simple to fix, if you have control of the host, make sure that you pass the --enable-ctype flag to the configure program when you compile PHP. For more information check here http://us2.php.net/manual/en/ctype.installation.php.

If you happen to be using FreeBSD and PHP5, simply install the textproc/php5-ctype port, and reload your Apache.

Trust this helps out some folks.

Performance Optimization WordPress Plugins by W3 EDGE