If you’re building a custom post type and want to let the user upload files, you’ll need to add enctype=”multipart/form-data” to the form tag, using the post_edit_form_tag filter. Otherwise the $_FILES array will be empty.
Author Archives: Ian Dunn
Creating Custom Post Types With Extra Fields
Richard Shepherd’s post on creating custom post types in WordPress is the first good example I’ve found that covers adding extra data fields.
Why RSS is Important
Kroc Camen makes a good argument for why RSS is important and points out how web browsers can better support it.
How to Erase Sensitive Data from a Hard Drive
Aaron Toponce has documented a way to overwrite sensitive data on a hard drive that is fast and gives you a running progress meter.
How to Backup Placemarks in Google Maps
Software Bloat
Excessive SEO is Ruining Google Search
Sadly, I have to completly agree with Jeff Atwood’s assessment of the recent decline in the quality of Google search results:
People whose opinions I respect have all been echoing the same sentiment — Google, the once essential tool, is somehow losing its edge. The spammers, scrapers, and SEO’ed-to-the-hilt content farms are winning.
W3Schools Isn’t Official or Accurate
Choosing a Video Format for the Web
Determining WordPress Paths and URLs
Using Chained Properties Inside $wpdb->prepare()
Capturing WordPress Plugin Activation Errors
The Correct Way to Roll Cables
How to Find a Twitter User’s RSS Feed
Reserved WordPress URL Parameters
Using a reserved WordPress URL parameter (like “year” or “m”) on the front end will cause a 404 error.
Directory Permissions for WordPress under Plesk/Linux
Jason Diehl describes the right way to setup directory permissions on a Linux box running Plesk so that WordPress can automatically create the directories it uses to store uploads. Basically, you need to make sure that PHP’s safe mode is turned off and that wp-content is owned by apache, in the apache group, and chmod’d to 777.
Overwrite Uploads Plugin
I just checked a new plugin called Overwrite Uploads into the WordPress.org repository. It gives users the option to overwrite existing files when uploading rather than WordPress’ default behavior, which is to add a 1 to the end of the filename, e.g., filename1.jpg.
WordPress Plugin and Theme Security
Body Classes Instead of Conditional Stylesheets
Light and Clean CSS Message Box Styles
Here are a couple examples of good colors to use for clean CSS message boxes: