Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

update_post_meta() with a modified array?

Try this code:

 
function cf_description_to_content($post_ID){
    $data = get_post_meta( $post_ID, 'wiloke_listgo_my_custom_fields', true );
    // Put whatver description you want assign to the description field
    $data['description'] = $_POST['wiloke_listgo_my_custom_fields'];
    update_post_meta( $post_ID, 'wiloke_listgo_my_custom_fields', $data ); 
}
add_action('save_post', 'cf_description_to_content', 100, 1); 

Related Posts:

  1. Updating wp_options with an array on save_post results in duplicated entries
  2. update_post_meta from data in multidimensional array created from a form
  3. How to get update_post_meta output to include string length
  4. Retrieving multiple values to the Post Meta (using an array)
  5. Update post meta does not serialize array
  6. How to use json_decode a post_meta value? [duplicate]
  7. Print specific values stored in a post meta array
  8. Random element in get_post_meta array
  9. update_post_meta adding to array instead of replacing value
  10. Add Array record to Meta Post
  11. How i can extract data
  12. update_post_meta array issues
  13. Update Post Meta for Arrays — Remove/Replace Single Value from Multi Dimensional Array
  14. How do I retrieve a value from a multi – dimensional array using get_post_meta? [duplicate]
  15. How to match data in multidimensional array of post_meta_data?
  16. How to extract data from a post meta serialized array?
  17. Passing error/warning messages from a meta box to “admin_notices”
  18. Nice way to print_r arrays
  19. Why does get_users suddenly return duplicates?
  20. Execute action after post is saved with all related post_meta records (data)
  21. update_post_meta and update_field ony working when saving the post
  22. When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?
  23. How can merge two arrays values in one array and save in database
  24. WordPress: How to use post_class() in an echo
  25. Is it possible to store arrays in a custom field?
  26. Get updated meta data after save_post hook
  27. Manipulating post meta in the customizer
  28. How do I pass an array as an argument to a WP-CLI command?
  29. How to update single value in multi dimensional Post Meta?
  30. Add post meta based on another post meta value before publish post
  31. Passing a variable into Contact Form 7 [closed]
  32. Better post meta efficiency?
  33. update_post_meta() not working in save_post
  34. How do I save each option in a multiple select menu as it’s own meta_key + meta_value pair?
  35. Comma seperated list of ID’s as an array?
  36. How to store post meta in an array?
  37. WP Meta Query for some meta (array) values
  38. Post meta checkbox becomes unchecked occasionally
  39. post__in works but also prints the word Array
  40. Make Selected Mutiselect Items “selected”
  41. Compare two meta key values against each other inside the get_posts array?
  42. settings api store multiple array
  43. Metabox of one post influence setting on other
  44. if is_singular array not working as expected
  45. How do I update a specific object in an array, in user meta?
  46. Get posts id in array by meta value and key
  47. Automatically adding meta data to posts or multiple query help
  48. Get updated post meta on save_post action?
  49. update_post_meta not working in save_post
  50. Correct processing of `$_POST`, following WordPress Coding Standards
  51. update_post_meta() whenever custom post type is updated
  52. unable to save post meta on single field with multiple selects
  53. How to save array of datas in option page by setting api?
  54. Sort a custom post type array numerically
  55. Trigger “unsaved changes” dialog for custom post meta changes
  56. How to add day number and initial to my post graph?
  57. Delete post meta conditionally after save post
  58. How to validate register settings array
  59. How to check an array of $curauth fields?
  60. Problem with wp_update_post
  61. Replace text inside a huge multidimensional array
  62. How to use IN array properly in WordPress?
  63. Set default Custom Post Meta Value
  64. Get specific custom field keys from a post and put into an array
  65. My theme saves their custom post type’s metadata as a serialized array, how to access the keys?
  66. WordPress Plugin Dev: Using array for WP options
  67. Only a part of array is stored in transient – what could be causing this?
  68. Set the value of custom field when post is published or updated
  69. Return array keys and values
  70. How pass a 0 in $atts?
  71. get_*_meta doesn’t always return an array
  72. How to save data of an input field to an array
  73. Run a check for multiple meta key values
  74. Get Meta Key Value While Saving Post
  75. Echoing a variable inside a function
  76. Stuck with a Custom Field Check box Array
  77. Plugin with action ‘save_post’ needs to press publish twice on order to publish
  78. Unset field from an array not working as expected
  79. Compare with WP Meta Query
  80. How to Translate a string of an array inside a class?
  81. How to pass conditional array to wp_localize_script
  82. ACF (Advanced Custom Fields) not updating post or postmeta values
  83. Set default value field meta_Value [closed]
  84. Modify foreach loop for social sharing links?
  85. Combine get_page_by_title to exclude pages from wp_list_pages
  86. Plugin settings page checkbox not saving – one options array with sub array
  87. Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
  88. Selecting and outputting results from DB with an array
  89. Struggling with array and foreach loop
  90. Customizer Settings in Arrays
  91. Update post meta using save_post hook in multisite
  92. Saving zero as meta value
  93. WordPress i18n in Array throws Error
  94. How to decipher the following array
  95. Save meta box values as an array to wp_postmeta
  96. How to display line breaked meta values in table?
  97. Post meta as array looks like string instead of array
  98. Save post meta foreach loop
  99. Organizing and grouping an array by year
  100. Time & Date on Post – Time Ago Custom Function
Categories array Tags array, post-meta, save-post
Multiple categories PROBLEM and Duplicating main categories
Ultimate Member callback function issue

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress