Simple Fields for WordPress let you add groups of fields to your edit posts page. It’s a more advanced and better alternative to the built in custom fields in WordPress.
Development version
If you want to try out the latest development version you can find the development version of Simple Fields at GitHub. There you can also submit bug reports and feature requests.
Simple Fields Features
- For a quick intro please check out my introductory blogpost “Simple Fields is WordPress Custom Fields on Steroids“.
- Add textboxes, text areas, checkboxes, radio buttons, dropdowns, and file browser to the post admin area
- Much easier for the user than regular custom fields
- Group fields together into logical groups. For example combine File + Name + Description into a an Attachments-group.
- Use “repeatable” field groups to add many any amount of field groups to a single post – great for images or attachments!
- Use drag and drop to change order of added repeatable groups
- Different post types can use different field groups – actually you can even use different field groups even for same post type
- Nice GUI that looks like the rest of WordPress




Hi, I just tried your plugin and I must say it’s one of the best Custom Metaboxes plugin ever – and I tried them all: magic fields, more fields, custom field templates, supple forms, verve metaboxes…
The only problem i had was a php error that prevented the plugin from activating. The error was at line 64 on functions-admin.php. So I just deleted lines 64 to 71.
Now everything seems to work.
On the other hand, I think you put some added complexity on the administration side of the custom fields with all that Post-connectors and post type defaults stuff.
I really don’t think they are needed.
Just take a look on Verve Metaboxes and see how it handles this more easily.
OBS: You should delete that .psd file from the zip.
One extra feature you could add to the plugin is to also allow duplicated fields, just like magic fields does.
Thanks for this amazing plugin!
Hey, and thanks for the comment!
It’s very good to hear that you like it. Just like you, I’ve tried all (?) other field plugins and didn’t find any that I liked. So I wrote one myself
I know that the post connector and stuff is a bit complicated, but it also brings a lot of flexibility. But this plugin is still beta and under heavy development, so things may change. I will however take a look at Verve Metaboxes and…we’ll see what happens!
Hi,
Great plugin! This was exactly what I was looking for to help a non-profit (NGO) add extra details about their projects to a sidebar area of their WordPress blog. And the GUI is nice too.
1 question/idea though: It would be great to have a Widget to pull these custom fields and place them in sidebar.
Anything like that in the works? Or should I grab a random custom fields widget from the WordPress/Plugins site?
Cheers!
Thanks for the comment!
The idea of an widget is pretty good and I’ll see what I can do about that. Until then you should probably see if there’s any existing plugin that can do that work for you.
This should facilitate serializations of posts other than by date/time. I write content somewhat at random that has to be inserted among posts already published in a category and one of several subcategories. How could I create a field named “serialization” and assign a numeric value that places a post properly among posts in any cat/sub-cat sequence? Any suggestions?
I’m sorry, but I’m not sure that I understand your problem. Could you explain it a bit more?
Although I am open to your CMS tree page view that makes content ordering easy, (it is installed – works well!!), I wanted to use posts that could be sequenced (or serialized) in a similar manner, perhaps by using custom fields. This would help (I believe) to make better use of the 2010 theme’s new navbar.
For posts created in random order that need to be sequences much like chapters in a novel or textbook, I could typically assign each post a multiple value of five (5,10,15,20 etc). I could then insert ‘after-thought’ posts like (5,7,10,11,13,15, 20,21 etc.) so that a numeric sort would yield the desired published sequence.
Does this help? And many thanks for responding.
Ok, I think I know what you are looking for now. There is currently no way to automate this with Simple Fields – if that’s what you’re looking for.
But you could, as you yourself write, use a custom field and enter a number there and then sort the pages by that number.
I’ve checked the documentationen and there is an option to sort by a custom field:
http://codex.wordpress.org/Function_Reference/query_posts#Custom_Field_Parameters
Hi there!
Love this plugin, it’s just what I needed. One problem though – I’ve installed it on a clean install of WP3, and when I add a field of type “File”, the file browser doesn’t work. It just shows a search box, and a filter button, and none of it does anything. Any ideas why that might be?
Thank you!
Sorry about that, it’s a bug and I’m aware of it. I will try to upload a new version of the plugin later today or tomorrow.
Oh thanks!
One other thing. I want to use query_posts() to list posts that have a certain value set in a custom field created with Simple Fields. I know the normal way is to use meta_key & meta_value, but how can I use those with fields created by this plugin?
Good question! Simple Fields does store its values as regular (although hidden) custom fields, so they should work fine with meta_key/meta_value. The problem is however to get the name of each field, since they are hidden and not shown anywhere. Hm.. Have to think about this and add a new function or something for this. Hang on!
Ok, I’ve submitted a new version now. In this new version, when editing a post you now have a link called “Show custom field keys”.
Let me know if this solves the meta_key-problem.
I have noticed a bug, if you have multiple file fields, clearing one will clear them all in that post/page. I am using WP 3.0 if that makes a difference
Thanks
Thanks for the bug report. I can however not reproduce this. If I choose “clear”, only that file field will be cleared. Are you able to reproduce your problem everytime?
I have just tested again and yes it seems to do it every time, I just upgraded to WP 3.0 RC3 but that made no difference either.
What web server are you using? Also, what other plugins are installed?
I changed line 415 in scripts.js from
——–
var $li = $(this).closest(“li”);
—–
to
——–
var $li = $(this).closest(“li .simple-fields-metabox-field”);
——–
Then it’s more correct, and works perfectly.
I also suggest changing line 50 in functions_post.php to:
$custom_field_value = trim($one_field_value);
As it trims the whitespace, great plugin btw!
Thanks! Also, I’ll take your suggestion into consideration.
Hello!
looks like a very useful plugin but unfortunately I can’t seem to activate it running WP3.1 from trunk i get an error about unexpected $end in file functions_admin.php at the last line. Any ideas as to what could be wrong?
Keep up the good work on this great piece of code.
Tried it with the 3.0 Final just to make sure it wasn’t something in trunk that messed things up. But still no cigar. Same error.
Hm.. perhaps a PHP-version issue. What version of PHP are you running?
Hi, had a look at the source and i fount php open tags in the old short style. My server had them turned off for php since that has been the recommendation for a few years not to use them. But now i switched short_open_tag = On and it activated ok. Just thought I should let you know that some people might have problems with that if their hosting doesn’t give them control of their php.ini
Ah, thanks for finding that one out! I always seem to forgot those things
Have been playing around with the plug-in a bit. Just love it. Any plans on adding additional editors. Like editors for date and time?
It’s definitely something that I may add. I need to use the plugin a bit myself first before I decide what to add next. But yes: more field types will come!
Just noticed a strange thing. When i have the plug-in active my widgets page stops functioning (no drag/drop or response from widget headers). Haven’t tried to debug it on a clean site yet. Just dropped you a line to see if it is something that should affect that. Like loading some script on all admin pages or something.
Is this on the latest version of Simple Fields? It sounds like a problem that I used to have, but it should be fixed by now.
Yes this is on version 0.2.5. Anything I can test to verify?
As soon as i deactivate the plug-in widgets behave normally again.
Ok, strange. No idea why that would happen. Any other plugins installed?
Yeah found the issue. Some sort of conflict with the Rich Text Widget plug-in.
Do you have any URL to this plugin, so I can see if there is anything I can do about it?
Hej Pär !
Jag har pulat en del med wp, och tycker att det jag läser och har sett av ditt plugin verkar klockrent.
Funderat på att göra något för att lixom visa dom custom-fälten åxå.
Kanske är en mer allmänfråga en specifik till just ditt plugin, men du verkar juh ha huvvet på skaft o vara snabb som en vessla, så du kanske kan bistå med något ffifgt sätt att visa de olika custom fälten man faktiskt kan mata in?
Tjena! Det som finns idag för att visa fälten är beskrivet här:
http://eskapism.se/code-playground/simple-fields/tutorial-part-2/
Jag tror man kommer rätt långt med det. Det kanske inte är jättelätt att hänga med i svängarna, men med lite tålamod så kommer man långt!
Hello. You have created a couple of excellent plugins and I commend you for their intuitive interfaces. I’m having a few issues however that seem to be bugs.
#1 – In the CMS Tree Page View Plugin, reordering items seems to be pretty much broken. When I look at the Post Order of them, they all end up being like the same number and thus don’t sort correctly. It seems the logic for determining how to set post orders may be faulty.
#2 – With Simple Fields, Inherit from Parent doesn’t seem to be functional at all. I definitely have a parent item with field group set and a direct child with Inherit from Parent set and the field group does not appear in the child.
I’m using WP 3.0 that was upgraded from 3.0 RC 2.
Thank you! Very happy to hear that you like the interfaces. I’ve spent pretty much time working on them
And thanks for the bug reports. I’ll try to get them fixed in the next versions.
I just tested reordering posts on my local wordpress installation and it seems to work. Does it never work for you, or just sometimes? Also, before reordering the pages, do they all have the same order number then?
I just did a clean install of 3.0 release and confirmed that there’s something wrong with the plugin itself which is causing Inherit from Parent to not work at all.
I debugged the Inheritance problem. Line 392 of functions_post.php is:
simple_fields_get_selected_connector_for_post($parent_post);
and should
$connector_to_use = simple_fields_get_selected_connector_for_post($parent_post);
A useful feature would be the ability to apply a field connector to all the children of a page. As it is now, I can set a parent page to a connector and set all the children to inherit, but I don’t actually want the fields to be used on the parent.
For example, I’m using page structure as the navigational structure on a site I’m building. In the product catalog I have different categories of products, each with their own specific connectors. So say I have:
Product Category
Product 1
Product 2
Product 3
I apply the connector to Product Category so it inherits to all the children, but the Product Category page itself doesn’t need to custom fields.
I would imagine this situation happens most of the time when you’re using inheritance, as the container for children usually doesn’t share attributes with the children.
I absolutely understand what you mean but this and I must say I’m a bit surprised that I haven’t thought about this myself yet. This will definitely go in my todo-list.
In regards to the bug with ordering in CMS Tree Page View, all the pages started with 0 as their order. After reordering about 10 pages a number of times they all ended up with orders of like 22-24. Most were 23. It was pretty weird, I’ll take a look and see if I can get some more specifics for debugging it. I just didn’t have time to get into it and I manually ordered them.
Wow, can’t believe you actually went through my code
Thanks a lot!
I just got the following error when I tried to activate the plugin:
“Fatal error: Call to undefined function menu_page_url() in /home/taylorl/public_html/taylorloftin.com/test/wp-content/plugins/simple-fields/simple_fields.php on line 59″
I had to delete the entire plugin from the folder in order to use my site!
I’m sorry to hear that you had problems with my plugin. Simple Fields requires WordPress 3 now, but I know I should make that a bit more clear on the plugin page.
There seems to be a couple of javascript errors that occur when trying to upload a file through the wordpress file uploader.
this is what firebug is outputting.
a.ui is undefined
[Break on this error] (function(a){a.widget(“ui.sortable”,a….”intersect”,zIndex:1000}})})(jQuery);
$(“#simple-fields-field-group-existing-fields ul:first”).sortable is not a function
[Break on this error] handle: “.simple-fields-field-group-one-field-handle”
I am only using 2 other plugins. SlidePress and cForms.
I said trying to upload a file, but I meant it happens when i click “show” in the media gallery from WordPress’ Gallery browser.
Ok, thanks for the bug report. I’ll take a look at this.
Im also getting this error Only on the dashboard.
$(“#simple-fields-field-group-existing-fields ul:first”).sortable is not a function
[Break on this error] handle: “.simple-fields-field-group-one-field-handle”
Problem is. Its not occurring in my Dev install.
Hi again, couple of suggestions would be to add the ability to edit the HTML view of a post area and to be able to make the textarea box size adjustable like the normal post textarea.
Many thanks,
Aaron.
Thanks, good suggestions!
Great! How hard would it be to add in the edit HTML of a textarea post box? It’s just that I could really do with that ability to make wordpress into a true CMS. Simple fields is one of the best plugins I have used.
Regards,
Aaron
It’s on my todo-list, so hopefully this will work in the next version.
Tja, ser ut som ett galet nice plugin, skulle just sätta mig ned och utveckla något liknande, men hittade detta, dock Så förstör nuvarande installationen min admin panel, jag har WordPress 2.8.4. och det går inte att slutföra installationen, har inte någora error påslagna för tillfället så allt jag kan ge dig nu är att den stannar på “plugins.php?activate=true&plugin_status=all&paged=1″ och efter det kan man inte använda admin panelen förs man tar bortt pluggin mappen
Jag ska sätta mig ned och pilla lite senare idag, så kan nog komma med mer info då
Mvh Robin
Oki, såg att det var 3.0 som gällde, så nu fungerar det mesta, går dock inte att lägga till
dropdown values,
+ Add dropdown value
ger
Uncaught ReferenceError: simple_fields_field_type_options_dropdown_values_add is not defined
Just so u know
Funktionen låg inuti ännu en jquery DOM function, var därför det inte fungerade, så ta och flytta ur simple_fields_field_type_options_dropdown_values_add() från den andra $() functionen så ska allt funka fin fint.
Mvh Robin
Wow, bra grävt där!
Jag skyfflade runt lite kod häromdagen och har uppenbarligen inte testat allt sen dess. Ny version kommer på momangen (och i dessa sommartider så betyder det väl under veckan iaf, tror jag..).
Hör av dig om du hittar fler buggar eller om du har några önskemål på funktioner eller så.
Tja, försöker att utveckla lite på mitt håll också, men är första gången jag jobbar med kodmessigt med custom filds.
Jag skulle behöva specificera både value och id på dropdown menyn i admin, hur skulle du gå tillväga? Bara logiken alltså, koden kan jag nog fixa själv
Mvh Robin
var inget, räckte med att ändra option databasen, vill du ha kokändringarna så säg till, men kanse är lite overkill för vanliga användare
Instämmer i hyllningskören. Dock hade det varit riktigt bra om WYSIWYG-editorn gick att förstora precis som man kan göra med standardinmatningsfältet. Som det är nu är det lite jobbigt att navigera i editorn om det handlar om långa texter… Alltså en dra-släpp funktion för att ändra dess storlek.
Heh… man borde läsa bättre. Ser nu att någon efterfrågat just detta bara några rader upp. Sorry!
Ja där får du underkänt!
Men funktionen är eftersökt och lär med rätt stor sannolikhet komma i nästa version. Håll ut!
Hi!
great plugin )
I slightly modified it by adding a function to download files, using SWFUpload
Find the time to look, and perhaps integrate this feature in your plugin.
http://eklmn.org/wordpress_plugins/!uno edited + fileupload (from original version 0.2.7).zip
Changes in the original files are made between lines ####### {somenumbers} unodj #########
I apologize for the messy code in a hurry ))))
Hi, Awesome plugin. Simple to use but can be used to achieve some complex results.
1 Problem I am having is finding the right meta_value for query_posts.
I would like to show posts from only a specific post type, with a specific meta_key and meta_value eg
Getting the meta_key is nice and easy(thanks to your “Show custom field keys” feature) I can’t seem to get the right meta_value though. I have tried with numerous values and am entering the value exactly as it is echoed on the page, but when I do this no posts are shown. I assume then that the meta_value thats echoed is not actually the same as the meta_value stored in database.
Thanks for a very powerful cms plugin!
Oooo also another little issue I’m seeing is that when I use a file field and echo it out, rather than get the image, I just get numbers, 355 for examle
It’s actually meant to be like that. Since I don’t know what the developer wants to do with a file (show it? print the filename? output the dimensions?) the plugin only returns the file ID, and then you can use WordPress own functions to fetch more info about the file.
Useful functions include:
http://codex.wordpress.org/Function_Reference/get_post
http://codex.wordpress.org/Function_Reference/wp_get_attachment_metadata
http://codex.wordpress.org/Function_Reference/wp_get_attachment_image
http://codex.wordpress.org/Function_Reference/get_attachment_link
Had a trawl through the database and found that the drop downs have an actual meta value of
dropdown_num_”number”
eg
dropdown_num_4
A cool feature would be making this easier to find (though in honesty its not to hard to locate in the database
I’ll take a look at this. It should be the same, but maybe I have made a mistake somewhere.
Thank you for the plugin! Knowing it exists makes the prospect of using WP3 as a CMS much more attractive. I seem to be having a few minor problems though:
1. With file uploads I click ‘select’ and all I am shown is the media library, without the ‘from Computer’ or ‘From URL’ tabs. I found this to be the case in both Safari and Firefox.
2. I’m probably a little out of my depth here, but can you tell me which file/template I should pasting the simple_fields_get_post_value script (method one) into? single.php only seems to display the custom fields when the post itself is selected – when I try to display a page of custom posts the field values are nowhere to be seen. Also, whereabout in the file I should be pasting the script? I’ve hit a brick wall with the wordpress.org docs.
I should note that I am using Simple Fields in conjunction with the Custom Post Type UI plugin.
Thanks again!
Have you thought about adding the ability for a blogger to add additional instances of a field on the fly?
For example, I have Products with a description and an image and 1 example link, but an additional product might require 2 images, and 1 description and 3 example links.
I am looking around to see if anyone has created this for their custom fields add_meta_box yet.
Maybe.. Simple fields have something called “Repeatable fields” that sounds like what you’re after. In your example you could create the fields “images”, “descriptions” and “links” and make them repeatable. Then you can add as many images, descriptions and links as you want.
Is that what/how you mean?
This really is a great plugin, and it’s solving several problems I’d had with other metafield plugins, specifically as they bind to Custom Types and one-off Pages. So, thanks!
Unfortunately, the only thing holding me back from using it on a few projects now is the File Field/Upload problem that others have reported, too. I’ve tested it in Mac/FF, Mac/Saf, Mac/Chrome, PC/IE, and PC/FF, and I can’t get it to work in anything. It just keeps bringing up the faulty quasi-Media-Upload box, with broken tools. Do you have an update on when you think this will be fixed in the plugin? I’d love to use it, and recommend it!
Thanks again.
Yes, the file field/upload function is definetly broken.
I wonder why did You release the plugin with this important part not working?
The file browser works fine for me, but yes there have been some problems for some users with the file browser. If you have information that can help me to find the reason for this, please let me know.
You can not upload files yet, this is a functionally that I will try to add later on.
The plugin is still very useful and I did release it as a beta because it is a very useful plugin with a great GUI and with functions that I have not seen anywhere else yet.
Does this answer your question?
This is a really great plugin. It allows you to do many things that should be in the WP core to start with.
But it’s currently broken in my installation of WordPress 3.0.1 & Simple Fields 0.2.9.
The problem is that you cannot select a file for a file input field. Everything works fine until you click the “select file” link, which causes a javascript error. This will broke the “select” button on the next screen.
Firefox 3.6.2 says:
Error: jQuery is not defined
Source file: http://fungimaa.com/wordpress/wp-content/plugins/simple-fields/scripts.js
Line: 430
}(jQuery)); // This is the line
Internet Explorer 8 says:
‘jQuery’ is not defined – scripts.js, line 2 char 1
I hope this helps!
By the way, if you need an example of how to add media files check the Attachments plugin:
http://mondaybynoon.com/wordpress-attachments/
Thanks for the bug report Mikko.
I’m gonna try to give the file selector an overhaul soon, so hopefully it will start to work better..
Yes, your plugin is great, and I say so sincerely but what I mean is that file browser / input did not work.
Now that it works I haven´t gotten a glue how to make it work, can You help me get the url of the file I selected?
Alright, I got it done myself, but I have a more reasonable question, regarding the ability to make conditional if statements with simple fields.
In example, when I want to check whether a certain simple field is filled and then display the container of that field.
Answering that question would be interesting for a lot of developers.
Wow, I feel like a TV Shop presenter – I got everything done – in just minutes with this plugin.
Makes me think of donating… mhmm..
Hi, This is a great, useful plugin. Thank you!
I found a bug today:
I created a repeatable field group with several checkboxes (one for each day of the week).
In my post I added a couple of this groups and in each one I checked a different checkbox (for example, monday in the first froup and friday on the second). Then when I saved the post, both checkboxes (monday and friday) appeared checked only in the first group.
However if I check the same box in both groups, they are saved ok.
I’m using wp 3.01
Thanks for the bug report. I’ll see if I can reproduce this and if I can I will try to fix this as soon as possible.
Hi, I fixed it!
The problem has to do with checkboxes, which aren’t sent as post variable if they are not checked.
So let’s say a checkbox is repeated, but only the second one is checked. However the save function would save it as the first one, as it isn’t looking into the numInSet from the $_POST; instead it is making the numInSet from the number of times a variable is sent.
Here’s the fix: lines 173-186 in functions_post.php
//$num_in_set = 0;
foreach ($one_field_values as $num_in_set => $one_field_value) {
$custom_field_key = “_simple_fields_fieldGroupID_{$one_field_group_id}_fieldID_{$one_field_id}_numInSet_{$num_in_set}”;
$custom_field_value = $one_field_value;
if ($do_wpautop) {
$custom_field_value = wpautop($custom_field_value);
#var_dump($custom_field_value);#exit;
}
update_post_meta($post_id, $custom_field_key, $custom_field_value);
//$num_in_set++;
Wow, good job! Just can’t understand that you managed to understand my code
I’ll try this myself and add it to the plugin if it works (which is probably does!).
Hey, wonderful plugin! Any chance to get repeatable fields inside a group in addition to a repeatable group? And any chance that the actual field names get any reference to the label used? Would be good in case someone ever wants to access them without the plugin.
Hi, thanks!
Repeatable fields would be cool, I agree. It’s on my stuff-to-hopefully-do-list.
I don’t think I will store the fields with the same name as the label. I rather preferer it like this, so you can change the name of a field and so on, without it affecting the “internals” of the plugin. But I am thinking of a way to access the fields by name instead of id. So stay tuned!
Thanks Pär,
I most definitely will stay tuned. Your plugin is the best thing I’ve seen so far and a *HUGE* UI progress for WP as a whole! That there is no custom field input UI so far in WP is among the things I really don’t understand about the developer preferences. There really should be a common custom field naming standard accessible to everyone.
One thing I noted when playing around with the plugin – field groups I delete in the simple fields editor are still available on the edit screen. Is that intentional? Is there any way to delete them entirely?
Playing around, I also noted that it would be great to be able to include already created custom variables and assign them to field groups. I’m in the process of importing old content with *tons* of custom fields from a custom CMS into WP/Buddypress and right now, I’ll have to created the entire field group before writing the import script so I can then import the data into custom fields with the keys assigned by custom fields. That’s the background of my question about the field names/labels.
Again – thanks for writing this amazing plugin!
Oh, and – I don’t want to appear greedy… but a date-field with date-picker would be fantastic!
Agreed!
Hey Pär,
I gave it a try, and realized that setting up new field types isn’t magic – ie, for a simple one like a date field it’s only a couple of lines of code. One line in the option-group for setting the post types up and a couple of lines for the new condition in the display function. I slightly modified the text field.
What I can’t seem to get working correctly is the jQuery datepicker… whatever I do it doesn’t want to work with the $ even though the $ is fine for all the libraries you included. This is the code I added to the script.js-file.
.datepicker is the class name of the modified text-field for the “date”-field type.
$(“.datepicker”).live(“click”, function() { $(this).datepicker({showOn:’focus’}).focus();
});
as per
http://www.vancelucas.com/blog/jquery-ui-datepicker-with-ajax-and-livequery/
Doesn’t work.
Any idea?
Super-late reply, but try with jQuery instead of $.
Pär,
I think I figured out the problem I had with the template functions.
Within your walker/retrieval function there’s a part that looks for how often the fieldgroup has been added in addition to the first instance, starting with 0 -
>>>
$num_added_field_groups = 0;
while (get_post_meta($post_id, “_simple_fields_fieldGroupID_{$one_field_group["id"]}_fieldID_added_numInSet_{$num_added_field_groups}”, true)) {
$num_added_field_groups++;
}
<<>>
for ($num_in_set = 0; $num_in_set < $num_added_field_groups; $num_in_set++)
<<<
I changed the operator in the for-loop from < to <= in order to make it work for me (single field group). And now it does work.
And somehow my explanations were swallowed by the formatting…
Basically, with both num_in_fields and added_field_groups being 0 the for loop will never execute, and that’s the case if only one field group is added to a post.
Oh, it would also be really cool to be able to save field groups as templates and only have to modify them for reuse instead of having to set the modified ones up completely.
Yupp, that would be great!
In one wordpress installation the plugin did work fine , in the another one it didn’t work at all.. the time it didn’t work all I recieved was this error message wherever I went (I had to delete the whole plugin folder):
Fatal error: Call to undefined function menu_page_url() in C:\Program\EasyPHP5.3.0\www\wordpress\wp-content\plugins\simple-fields\simple_fields.php on line 58
Do you think another plugin interfered with it?
the menu_page_url-error is probably because you’re not running the latest version of wp. It was added to version 3, I think.
it could be the wrong wordpress version also.. what ya think? Vad tror du brorsan?
Hi Pär,
Great plugin, does 90% of what I’m after but a quick little question.
I am using your plugin to display an image in a particular place in one of my templates (the home page in this example) so your File Upload is just what I am after. However, when I use it, the image I choose is then ‘attached’ to the page I am working with.
Is there anyway I can prevent this as I am using ‘attached’ images for some other functionality or is this necessary for your plugin to work?
Thanks again for the plugin, good work.
Pete
This is a neat plugin. +1 for the comment that it would be great to be able to pull in pre-existing custom fields.
When you click “clear” on a field, it clears all the fileds in a group, not just the one you want to clear.
Fix:
On scripts.js, line 415, change toL
var $parent = $(this).parent();
$parent.find(“.simple-fields-metabox-field-file-fileID”).val(“”);
$parent.find(“.simple-fields-metabox-field-file-selected-image”).text(“”);
$parent.find(“.simple-fields-metabox-field-file-selected-image-name”).text(“”);
Sorry, correcting myself:
var $parent = $(this).parent();
$parent.find(“.simple-fields-metabox-field-file-fileID”).val(“”);
$parent.parent().find(“.simple-fields-metabox-field-file-selected-image”).html(“”);
$parent.find(“.simple-fields-metabox-field-file-selected-image-name”).text(“”);
Hey,
Just a feature suggestion/request here. Would it be possible to have a field to assign a custom “custom field key” for new fields rather than having it auto-assign one that’s proprietary to the plugin? That would make this plugin all the much better and allow us to move our data from plugin to plugin if need be.
Cheers and great work!
Hi, I do understand what you’re looking for, but since I myself do not have this need I don’t think this is something I would spend time on. Sorry to dissatisfy, but it would simple be to time consuming. Hope you find the plugin useful anyway!
To answer Pete’s question above:
Assuming you have setup a group of fields called “File” and the field in which you upload your files into is called “src” than you can do the following (adjust the field names accordingly if need be). Put this in your functions.php template file:
$file = simple_fields_get_post_group_values(get_the_id(), “File”, true, 2);
$imagesrc = wp_get_attachment_url($file['src']);
And then you can include the following wherever you want to include the image in your template files (page.php or single.php, etc… (has to be in the loop though)):
<img src="” />
We’ve gone even further with this with some really custom stuff with loops and what not, but this should get you started.
Good luck!
Joey
stresslimitdesign.com
Seems like some of the code above got butchered by the comment system,
the tag should actually be: http://pastebin.com/yu9VNa0W
Cheers,
Joey
Thanks for helping out. And sorry for the comment system trashing code. I really got to fix that.. :/
Hi Pär, very nice plugin, I use it extensibly on mi site. Is there any chance to have a date field that stores an unix timestamp like this
http://matth.eu/wordpress-date-field-plugin
It will be very useful !!
Kindest regards,
gb
Indeed there is! It’s on my todo list, but I don’t know when I will have the time to finish it. But please hang in there!
Hi Pär, very nice plugin, I use it extensibly on mi site. Is there any chance to have a date field that stores an unix timestamp like this
http://matth.eu/wordpress-date-field-plugin
It will be very useful !!
Kindest regards,
gb
Hello Pär, loving the plugin!
I`m still a WordPress and PHP noob, but is it possible to add multiple groups of fields to a single page or post? To use the screenshots above that you made as examples, if I decide to make a new post with a slideshow, is it possible to add both Attachments and Slideshow groups of fields to the post? I suspect it isn`t, but I just want to make sure.
Thanks for all your great work!
Somewhat embarrassing, since the solution was so obvious, but I hear the best questions are the ones one can answer themselves.
So I figured out that it`s indeed possible; provided someone else has the same question: they just need to be added from within the Post Connector details.
Great plugin!
I’m having real trouble with the image / file selector. The regular uploader gui goes up, I upload my file, I press “use this”, but then.. nothing.
Do you use any special libs that wordpress doesnt that I should talk to my host about? Or am I just not 3117 enough?
Hm.. It should work. It does for me anyway!
If you trust me you can send me login to the site so I can take a look at it. If you trust a fellow swedish that is..
(It can – of course – also be due to the fact that you’re not cool enough. I should write that down in the FAQ…)
Great Plugin! However how would I go about making text fields work with short codes? I guess I have to apply a filter but I’m not sure how. Please advice.
My code:
$team_email = simple_fields_get_post_value($related_post->ID, array(1, 1), true);
echo “$team_email”;
How would I filter this to work with the shortcode I’ve put in the writepanel?
You should do something like this to make shortcodes work:
$content = …text from simple fields…;
$content = apply_filters(‘the_content’, $content);
$content = str_replace(‘]]>’, ‘]]>’, $content);
echo $content;
Tack! Tillbaka till kodbordet
Hey dude!
I wrote a few lines of code that could be helpful if using simple fields together with slideshow or whatever.
http://blogg.angrycreative.se/att-anvanda-simple-fields/
Hi there, If i could make a one suggestion. In the admin
area, when creating a simple field there are 2 things: 1. Name 2.
Type It would be maybe nice to have also “Description field” which
would then show up only in admin area telling webmaster a little
hint about what to put in that field. (Similar like when you show
custom field keys, right below name of custom field) Why, because
i’m not developing site for myself, and i think it would be useful.
For example if i have image field: Name: Thumbnail image Desc:
Thumbnail for article preview, must be 150x150px BR Vlado