Add new custom field group from admin (2 posts)

  1. Jay Hoffmann
    Posted 3 years ago #

    I am creating custom field groups in order to group together some custom fields in a post. Each custom field group has an image field, a text field, and a link field. My question is, is there a way to insert an "Add new Custom Field Group" button to the post editor, similar to the "Add Custom Field" button that is in the editor now. So, when you click this button, rather then one new custom field being created, an entire group is created, with an image, text and link in a metabox?

  2. bcworkz
    Posted 3 years ago #

    If you use the generic add_meta_box() instead of the more specific add_post_meta(), you can create a meta box with any arbitrary html form and save it's contents where ever it makes sense. Of course the price of this flexibility is you have to code everything, it's not handled for you.

Topic Closed

This topic has been closed to new replies.

About this Topic