You can insert an associative array into the post_meta_field.
Here is a quick little function to grab the data afterward (did not test):
function grab_task_name_array($post_id) {
$new_array = array();
$array = get_post_meta($post_id,'_task-name'); //do not put true as third parameter (this would return string and not array)
foreach($array[0] as $key => $value)
$new_array[$key] = $value;
return $new_array;
}
If you wanted to store a multidimensional array, some more checks would be needed.
Related Posts:
- Get Posts Under Custom Taxonomy
- Displaying the category name of a custom post type
- Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- How are terms connected with posts in database?
- Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms
- get_terms parent for current product only
- deleting terms programmatically
- How do I get the slug of a custom taxonomy category of a post?
- get_the_terms() to show all custom taxonomies
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- Avoid duplicate post from same Taxonomy
- Get posts by name and taxonomy term
- Set terms in a custom post
- Get posts of ONE taxonomy term of custom post type
- Choose whether to automatically add a taxonomy with the same name as the post
- Setting posts_per_page for taxonomy term template
- Force the “Choose from the most used tags” meta box section to always be expanded
- Posts list in custom taxonomy
- Get Posts Under Custom Taxonomy
- How to display posts via custom taxonomy terms using checkboxes?
- Saving custom fields to a custom taxonomy
- Copy taxonomy terms from one post to another programmatically
- Loop parent terms {display posts} AND loop child terms {display posts}
- Check if current user has a post and that post has any term/s from a specific custom taxonomy outside the loop
- How to associate a custom taxonomy to a post multiple times
- Customizing URL slugs of Custom Post Type and Taxonomy make posts/pages 404
- Filter By Term Not Working – Custom Post Type
- How to get post count including nested categories
- Custom Taxonomy From Database
- Displaying Results From Custom Taxonomy Query
- Multiple loops on a Search result page?
- How to get all the terms of a post
- Calling Different Custom Post Timestamps in a table
- How can I setup a relationship using categories in WordPress?
- Is it possible to paste a link without tags and make it directly a link in a post?
- sql select for post_title and a term name
- How to allow visitors to filter posts by multiple taxonomies
- How to add tags (custom taxonomy) to post class css?
- How can I hide tags on a child-category page, if that tag has not been used?
- Cannot retrieve a custom RSS field from posts
- 404 error on default post type and default taxonomy fronted page
- How to get Tags with specific post id
- How to automate featured posts number? [duplicate]
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Display custom taxonomy attached to the post on post single page
- outputting posts’ taxonomies: cant get ‘get_the_taxonomies’ working
- Customize rel=canonical tag for single blog post
- Change all author links in Blog roll
- How to I retrieve the ID from the Posts page?
- How to save meta checkbox WordPress
- Displaying posts that belong to a specific author
- Get posts and include taxonomy term
- How to calculate the average of a post meta value(Numeric) of a specific author
- Is there any way to tell when wp_postmeta has been updated?
- Display posts of specific category term
- Variable not working in WP_Query
- Displaying Custom Taxonomy without a hyperlink
- relating business and products with custom taxonomy?
- How to Display Posts From Category Within a Custom Taxonomy?
- Is there a query string for edit.php to show all posts that have no custom taxonomy terms?
- wpColorPicker – problem with implementation to post meta
- Form to post new post with custom taxonomies
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- WordPress bulk category select when publishing post
- How to add custom meta to ‘pre_get_terms’?
- Get Comma Seperated Taxonomy Linked Terms and Last Child Separated By “&” Instead Of Comma
- How to show a custom taxonomy in the theme?
- How to filter custom taxonomy term name, slug, and description?
- Change post author without using wp_update_post()
- How to group all terms children’s in custom taxonomy?
- Hierarchical taxonomy list with modificated term links
- if in category but only with post meta
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Show template part if part of term
- Parent category / child category posts
- wp_query with ajax
- one post per term taxonomy
- wp_set_object_terms NOT working on CPT, but wp_set_post_terms does
- Update post meta within save_post action
- How can I change the output display of my pagination?
- Exclude product attributes from taxonomy terms loop
- Display post number by category
- Updating post meta for checkbox
- Saving Post Data in Another Database
- Only allow posts with a specific term to only be viewed by other authors with the same term in their post
- Corrupted nav-menu?
- Get name of taxonomies of current page
- Programatically adding custom filters to post list
- Count the number of a post types associated with another post type
- Custom permalink for each post
- List Top 5 taxonomy terms based on number of post
- How can I tell if a post has been published at least once?
- Is there a way getting post fields using `transition_post_status`
- Automatic blog page with custom design [closed]
- Add multiple meta keys to a post at once
- Show number of posts by logged in user
- How does WP decide how to display a page
- Unable to differentiate between two categories under custom post type on single.php
- Copy/Move selected taxonomy terms to another taxonomy for posts