Simple Fields is WordPress Custom Fields on Steroids
I’ve created a new plugin for WordPress that now is ready for beta-testing. It’s called Simple Fields (and it requires WP 3), and it’s gonna rule your world (at least it rules my world – your opinion may vary).
The purpose of Simple Fields is to make it easy to display different kind of fields (text, textarea, checkboxes, radiobuttons, files…) when you edit a post. Fields that an administrator of a web site can change and edit. And fields that you can use in your page templates to perform different tasks.
I think some examples is the best way to show you how cool and useful this plugin is:
Example 1: create options for a page
Say you have a client website where they want to show a ”share this”-button on some pages, but on some other pages they don’t. And of course the client wants to be able to change this on a per-page-basis.
With Simple Fields it’s easy: add a field group with a checkbox called ”Show share-button”. It will then look like this when your client edit a post:
Cool eh? Now say the client also wants to be able to choose the style of the the share-button – size, color, whatever. No problem: edit your Simple Fields and add a dropdown with all the options you want to be available.
The next time the client edits the post it will look like this:
Now that’s a lovely drop down, dontcha think?
Example 2: repeatable fields = super easy slideshows!
Now for something a bit more advanced nah still a piece of cake: repeatable field groups. This is one of the features I really really really like with this plugin.
It’s very common these days for a web page to have multiple images, often displayed as a slideshow, where each image have it’s own caption and destination link. In WP you usually set up your images through the use of the built in custom fields. However, you (I do anyway…) can run into problems when you want to change to order of the images or add alternative texts (for the visually impaired and for search engines).
Using Simple Fields for this is so much easier and smarter: set up a new field group and add all the required fields. So something like this will get us started (ok, I went a bit crazy here and also added options for delay and transition effect, just to show off a bit!):
Wow, amazing! We can now add… one image to the post! But we want to be able to add any number of images to the post. Now this is where repeatable field groups come into action. We just change the Slideshow field group to be a ”repeatable field group”, and then edit the page again:
Wohaa! See the small, but yet huge, difference? Yes, we now have a ”Add”-link at the top. Click on that and you will get a new set of fields, like this:
See, now we have all required fields for two images. Want to have four images? Just click the add-link two more times and you’re done. Want to change the order of the images? No problem, just drag and drop!
That’s it for now
Ok, that’s it for now. I hope this short intro gave you some understanding of how this plugin works and what it is useful for. I would love if you took it for a beta-drive. And I would love if you gave me some feedback.





Hi, your plugin is very interesting.
It has a fetaure I need : repeatable fields
but are you planning to implmeent template specific custom fields, like Custom Field template does ?
Thanks for the feedback!
I haven’t thought any of template specific fields yet. For now I’m more into page-specific fields. Maybe because I don’t work that much with templates right now (not templates you can choose, anyway).
I will however add template specific custom fields to my list of ”things to consider”.
Hej Pär.
I like your plugin. Well done!
I think it would be nice to have the option of having these ekstra custom fields be visible as a default, so the user doesnt have to chose from the Simple Field dropdown and save first.
Vayu
Thanks!
Check out ”Post type defaults” in Simple Fields admin. There you can choose what connector to use as default for a post. Unless there is a bug somewhere, it should do the work for you.
Ah, okay thanks! I get an error here.
Call to undefined function get_post_type_object().
Maybe this is WP 3.0 function?
Yes, get_post_type_object is available since WP 3. Since WordPress 3 will be released very soon I’ve decided that Simple Fields will require it. Sorry if this causes any problems for you.
Hi again Pär.
I think your plugin is brilliant!
One feature that I am missing though, is to have multiple default post connectors for a post type.
Just a wish from a fellow Scandinavian.
Cordially
Vayu
Hi,
A field type that would be awesome, for which I had to make my own plugin, would be ”link to post”.
Mine is extremely simple, with no options backend (just a table with rows).
It creates a drop-down with the post titles of the selected post type, the ID of which is added as the meta.
Then a ”get_linked_post(‘my_tag_name’)” can be used within the loop.
Of course, if this plugin gets a bit more cunning, I will retire my own plugin at once.
Good idea. I’ll see if that’s something that I can implement.
Hi,
This plugin is great and does exactly what I’ve been searching for. I’ve installed in (in WP3) and its working fine, however if I choose type=”file” – when I click on the ”select file” link in post admin, I just get a blank popup window.
Am I missing something?
It should work. What version of PHP and browser+version are you using?
I’m using PHP Version 5.3.2, and have tried it in Firefox 3.6.6 and Safari 5.0 on a Mac.
The wordpress install is using MAMP running locally on my machine with the base url of http://localhost:8888 – could that be causing an issue?
It must be something with the MAMP/locally hosted setup. I’ve just installed Simple Fields on a live blog installation and the file picker popup is working perfectly!
This really is a useful plugin – good work!
A further update – I’ve since discovered that the problem was a conflict with the Custom Post Templates plugin – when I deactivated that plugin the popup media browser worked fine.
Ok, good job debuging Ross
I’ll install Custom Post Templates and see if I also get the problem.
Ok! I got that error too after activating Custom Post Templates. And.. *drumroll* I also managed to fix the problem. So update Simple Fields to the latest version and everything should work just fine.
Let me know if it the new version works for you!
Great! Updated the plugin and its working perfectly – thanks for the impressively quick fix!
Found a bug.
If this plugin is installed, it disables the ability to ‘Show’ media in the Media/Image Uploader of a post.
If I click on it, I see that the post admin in the lightboxed background seems to move very slightly downwards on each click. Really weird.
If I deactivate the plugin I’m able to ‘Show’ the image details in the image uploader Gallery tab once again.
AMAZING plugin otherwise!
Email me if you need any help from me locating the bug.
Marc
I’ve tried a few different setups, but none of the Simple Fields show up. Is there anything I should add to my theme?
The fields your adding to your posts/pages does not show up automatically in your theme. You must manually add it, using wordpress own functions, using a plugin, or using the functions that I created for simple fields.
These links may get you started:
http://wordpress.org/extend/plugins/custom-fields-shortcode/
http://wordpress.org/extend/plugins/conditional-custom-fields-shortcode/
http://codex.wordpress.org/Function_Reference/get_post_meta
http://eskapism.se/code-playground/simple-fields/functions/
http://eskapism.se/code-playground/simple-fields/tutorial/