From codex:
$meta_value (mixed) (required) The
value of the custom field you will
add. An array will be serialized into
a string. Default: None
So <?php add_post_meta(7, 'fruit', 'banana', 'apple', 'tornado', 'bob saget')
To grab them you can also use http://codex.wordpress.org/Function_Reference/get_post_custom_values
besides just get_post_meta
.
Related Posts:
- How to extract data from a post meta serialized array?
- get_*_meta doesn’t always return an array
- Unset field from an array not working as expected
- Post meta as array looks like string instead of array
- Time & Date on Post – Time Ago Custom Function
- Can A Post Meta Field Store multiple values that are not in an array?
- Array of user ids to list of user names
- update_post_meta() updating nested array in Multidimensional array with empty sub-array
- How can I update this array built from post meta data?
- What format is this and how to get value “lal” and “pila” from it
- How to get posts by meta value as multi-dimensional array?
- Multiple meta key and value search in the query
- Fetching array of postmeta with $wpdb and in_array conditional
- wp_postmeta store multiple values in one key [closed]
- How do I retrieve the slug of the current page?
- How to save an array with one metakey in postmeta?
- WordPress is stripping escape backslashes from JSON strings in post_meta
- Lack of composite indexes for meta tables
- Content hooks vs User hooks
- How can merge two arrays values in one array and save in database
- Why time functions show invalid time zone when using ‘c’ time format?
- Save both current and new version of post meta
- WP REST API “rest_no_route” when trying to update meta
- get_post_meta – get a single value
- What action hook updates post meta?
- Exclude a category from the filed under list
- How do I access post meta data when publishing a new post in Gutenberg?
- Are multiple values from get_post_meta guaranteed to be ordered?
- Add a post metadata if only the key and value does not exist
- How can I get values using key in Carbon Fields from Multiselect?
- WordPress Action Hooks and Post ID?
- Generate an Email address from that of the Post Author
- Get page->parent’s name?
- conditional function to change post-meta background image
- Does “update_post_meta” check if value is the same before updating?
- Custom meta field don’t give me numerical value
- how to get all post with the same post meta?
- update_post_meta() with a modified array?
- Echo page title from page with custom meta datetime picker
- MySQL Query To Select Post By Postmeta
- Update post_meta with WooCommere variation data
- Copy content stored in meta to post content
- How to programmatically customise the Contact Form7 notification email prior to sending? [closed]
- Saving repeated option values when querying in Published, draft and all
- How to hide meta block(s) in certain post format
- need some assistance with the checkboxes (selecting/deselecting featured posts)
- get_post_meta() not work for the first post inside the loop
- Adding new value to existing meta key
- how to get a list of meta data fields assocaited with a custom post type
- Gutenberg: How to display meta field data in the block frontend (save function)
- Get array of metakey in all posts
- String taken from database table post_meta is showing HTML tags on Frontend
- Delete posts based on post meta data
- Query posts WITHOUT a custom meta field
- Add box with custom per-page properties
- How to use two meta_compare in an array?
- get_post_meta not working when variable used for post ID
- Update post meta dynamically
- How do I edit the posted “by” and “on” in the post meta
- How to delete duplicate records in wp_postmeta database table?
- Need a SQL query to update meta_key=’_price’ with value in meta_key=’_regular_price’
- update_post_meta() adding bits in database [closed]
- Get posts ordered by meta data
- Displaying values from related field – if empty shows current post type’s link and title
- get_post_meta inside echo [closed]
- WordPress postmeta: Store data as an array or single item?
- Display Post Meta in Header
- Conditional For get_the_author_meta
- Custom fields or something else
- I want to Add Feedburner Right After Meta Details
- if get_post_meta function returns empty – Do Not Display HTML
- Custom column on CPT not showing correct value when meta data not set
- How to access post meta on the first time a post is published
- I Can’t get the post_tag name from term_id using wp_set_object_terms
- Trouble with serialized metadata
- URL from get_post_meta() is broken my URL
- How to update/add child posts meta whenever the parent post meta is updated?
- How to query post with meta?
- why is my postmeta table is so heavy
- update_post_meta() throws Uncaught error: Cannot create duplicate attribute
- Using a comma instead of a pipe to separate metadata
- Add Array record to Meta Post
- Export media library with metadata and import into new blog
- show user based on user_meta
- Meta keys won’t add using wp_insert_post
- How Can I extract Image urls from post meta
- Plugin Shortcode value in post
- Twenty Twelve entry meta data – change and move
- How can I prevent the post_modified column in wp_posts from being updated?
- Sorting meta box values by start- and enddate and all dates in between
- Use an id on a button to update_post_meta in post
- get_post_meta image width for lazy load
- Write query according to post_meta
- Custom Fields help
- Why values dont shows in custom post column?
- WP-API : post_meta not updated… but have another entry
- Parse error thrown by get_post_meta [closed]
- Build Array from Input Fields question
- How to get all the related ids without array?
- Remove action of an external plugin after checking if custom post meta is set