Update: This plugin is no longer being developed in favor of Custom Post Types in WordPress 3.0. Commenting has been closed.
Hi. Thanks for using the WP-Custom plugin. Here’s some interesting stuff about it (I really do encourage you to read this before you download):
Okay if you’re a wordpress rookie then this plugin’s no use to you. This is for those people who customize wordpress, who make wordpress themes and who make wordpress websites for their clients. Scared?
Let me explain. You’ve got a portfolio website done for a client of yours. He’s a designer, but no coder. It’d be very not nice to ask him to define three custom fields for every post: thumbnail, price and the time taken for a particular drawing. Huh?
The solution: Define three custom fields in wp-custom, have field names you’ll use in your theme as UIDs and friendly names as field captions. You may also define default values for each field. And voila! A tiny little WP-Custom box in your post publishing screen. Now minimize that old crappy custom fields section and show your client the new way!
If this sounds stupid then you just haven’t tried it yet. It really is more comfortable working with human-readable custom fields. This is the very first stage of the plugin development. I plan on getting it far more forward to make the perfect tool for theme developers.
As I wrote earlier it’s all about custom fields. It’s the way they look, and the way they should look. Let’s take a look at the Equilibrium theme for a while. There are images associated with every post and if you look closer, they’re taken from the ‘image’ custom field. If you read the installation tips you’ll figure out that you have to put the URL of the image (303×231 for big ones and 162×118 for the small ones) in the ‘image’ custom field.
Well, if I were the developer of that theme I’d use two custom fields ‘image_big’ and ‘image_small’ (you get my point…). Okay, so three days have passed and I already forgot what the dimensions of the images are and whether I should write the complete address in the custom fields or is it relative to the uploads directory. Jeez! I’d have to go look at the dimesions and open another post and check the custom fields there.
Now let’s try another way. Define two custom fields using WP-Custom with those same unique IDs: image_big and image_small. Define their captions: ‘Image 303×231 URL’ and ‘Image 162×118 URL’. Voila! You’ll never forget the dimensions again. Just think about how much time you can save with this, especially if you’re blogging in a team. So what does it require? A few plugin setup and some theme customization. It’s very simple after you get it right.
I’m also thinking about adding the feature to export and import WP-Custom settings. It’d be nice to ship those with a customized theme, making it an out-of-the-box product, right?
Here are some screenshots to make you proud.
After defining a few custom fields in the Manage section of the plugin, you can see that they’ve appeared in your edit post/page screens in the admin panel (look at the screenshots if you haven’t seen this live). Give them some values, then make them appear in your themes using the wpcustom() function with PHP, like this:
If you don’t want to echo out the field value then there’s a second parameter that forbids echo and returns the value instead:
$output = wpcustom("unique_id", true);
Download link, changelog and other notes. Officially hosted in the WordPress.org Plugin Directory: WP-Custom Plugin. I also like when people with WordPress.org accounts vote it up ;) thanks!