最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

customization - Collection of fields in a single post

programmeradmin2浏览0评论

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:

Screenshot: /files/images/blog/example-field-collection.png

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

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)?

https://drupal/project/field_collection

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

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

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

Share Improve this question asked Nov 18, 2013 at 14:47 ozkeozke 1677 bronze badges 4
  • Looks like a couple of meta boxes to me. What makes a set of fields a "collection"? – s_ha_dum Commented Nov 18, 2013 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 Commented Nov 18, 2013 at 15:46
  • ummm... meta boxes can be (and basically are) "images or any other kind of field". – s_ha_dum Commented Nov 18, 2013 at 15:48
  • But don't you have to predefine how many of them you have? – ozke Commented Nov 18, 2013 at 15:50
Add a comment  | 

1 Answer 1

Reset to default 0

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.

发布评论

评论列表(0)

  1. 暂无评论