0

I need a Custom Field where I can fill it with multiple values, for example

Custom Field Value

Images = img1.jpg, img2.jpg, img3.jpg

Thanks

Juancarlos Rodríguez
  • 1,574
  • 2
  • 12
  • 11

1 Answers1

0

Can you be more precise on what you want to do? Are you manipulating the post meta data from the theme files?

If so, you can actually pass arrays to update_post_meta and it will automatically serialize it.

  • Well, I'm creating my own "theme", right now I'm getting the information from a webservice. And I have to store date like a custom post type. So I'm creating some custom fields. I'm using this method: update_post_meta( $postId, 'Baths', $property['baths']); (for example) And I would like to insert more values into a custom field, for example: update_post_meta( $postId, 'Images', ("image1.jpg","image2.jpg","image3.jpg")); – Juancarlos Rodríguez Sep 03 '12 at 08:42
  • Thanks dude, you pointed me in the right direction. But I think that I need to serialize the array by my own. Because I didn't get the result that I was expecting. (It didn't do it automatically) – Juancarlos Rodríguez Sep 03 '12 at 13:25