Problem saving meta boxes with multiple custom fields on custom post types
-
I’m trying to develop a theme that makes intensive use of custom post types, meta boxes and custom fields. Some meta boxes have one single field, some other should have several.
Custom post types and taxonomies created for them are working fine. What does not work is having meta fields saved/updated in meta boxes that have more than one custom field in it.
After having created custom post types and taxonomies, I’ve added a few meta boxes:
There are actually many many more, but above it’s just a sample of two metaboxes, “product_slogan” will have only one meta field while “product_facts” will have at least 8 custom fields.
this is product_slogan:
and this is product_facts – inside product facts there are 8 custom fields (productfact1, productfact2…)
at last, I want to save all the meta boxes for the custom post type “product”, that should include “product_slogan” and “product_facts”, and their contents – I added a hidden nonce input as well, and this is the code I used to save custom meta boxes / fields:
my problem is that meta boxes like “product_slogan” that contain only one custom field (“product_slogan” itself) get saved or updated when I save the post, while meta boxes that contain multiple custom fields like “product_facts” do not get saved/updated. I have the same issues with other custom post types or meta boxes in the same page. I think I’m doing something wrong with meta boxes containing multiple fields. How do I solve this?
Any help is really appreciated!
thanks
- The topic ‘Problem saving meta boxes with multiple custom fields on custom post types’ is closed to new replies.