WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's possible to create custom post types and custom fields but, is it possible to create custom field collections?

That is, groups of different fields as an entity (a dropdown, two images and a textfield)?


In Drupal there's something like this: https://drupal.org/project/field_collection

Screenshot: http://www.commonplaces.com/sites/commonplaces.com/files/images/blog/example-field-collection.png

And I was wondering what's the closest thing in WP.

share|improve this question
Looks like a couple of meta boxes to me. What makes a set of fields a "collection"? – s_ha_dum Nov 18 '13 at 15:13
Those meta boxes could be a variable amount of images or any other kind of field. Hence why is not just meta boxes. At least that's what I think. – ozke Nov 18 '13 at 15:46
ummm... meta boxes can be (and basically are) "images or any other kind of field". – s_ha_dum Nov 18 '13 at 15:48
But don't you have to predefine how many of them you have? – ozke Nov 18 '13 at 15:50

The closest Thing in WordPress would be a custom meta box with repeatable fields. So to do that you would need create a a metabox using add_meta_box and if you look at this link you will also see an example of saving the custom fields in your meta box.

here is an example on a related question or if you want a much better option is to use a ready made class which will let you do just that with a few OOP settings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.