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

Block Editor – Meta values not saved, meta changes to empty array on update

So, in my case, the answer was simple, though it took a long time to find. Just in case anyone else ever has this issue, here is what solved it for me:

I was calling the register_post_meta in a file that was only being included if is_admin() returns true (this is a plugin metabox conversion, so there are some admin-only assets being called, etc)

Long story short: meta fields were being registered in the block editor because is_admin() returns true, but when the request was sent to REST, is_admin() is false, so the meta fields were not being registered, and an empty array was returned.

Related Posts:

  1. Update post meta custom field using block editor
  2. How to break meta values into different items and avoid duplicates?
  3. Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta
  4. How to save a ToggleControl value in a meta field?
  5. Custom Meta Box not Saving in Posts with Gutenberg Editor
  6. How to wrap meta values seperated by comma in ? [closed]
  7. Run a check for multiple meta key values
  8. IF Custom field value equals ZERO
  9. Looping inside block return
  10. Set class if a meta value is set within post archive
  11. WordPress Blocks, setAttributes not saving
  12. Can’t set custom meta fields for a post
  13. Custom meta POST request fired twice when updating a post in Gutenberg
  14. Custom Field: Display only if a specific key is selected outside the loop
  15. WP Query Args – search by meta_key or title
  16. Saving multiple custom meta box fields
  17. get Custom field label (select/dropdown) on front end
  18. SQL query based on two different custom field values
  19. What is the best way to get a different post’s custom field/postmeta with js?
  20. Can I exclude a post by meta key using pre_get_posts function?
  21. Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
  22. Max length of meta_value
  23. Custom post meta field effect on the performance on the post
  24. How to get custom post meta using REST API
  25. Difference between meta keys with _ and without _ [duplicate]
  26. Orderby meta_value only returns posts that have existing meta_key
  27. What is the index [0] for on post meta fields?
  28. What is “meta_input” parameter in wp_insert_post() used for?
  29. How to enable revisions for post meta data?
  30. The “_encloseme” Meta-Key Conundrum
  31. Best way to programmatically remove a category/term from a post
  32. Gutenberg add a custom metabox to default blocks
  33. Using get_post_meta with new_to_publish
  34. SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
  35. Add metabox to document tab in gutenberg
  36. Custom field metabox not showing in back-end
  37. So much data in postmeta
  38. Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
  39. SQL query to change the value of a Custom Field
  40. Custom field metabox not showing in back-end
  41. Post meta data not showing in frontend, until hitting ‘update’ button
  42. searching by keywords in post’s metas or pagination links problem
  43. Add custom field information to source meta data
  44. How do I update custom field post meta in frontend post template?
  45. Update custom field on page specific to logged in user
  46. How to Find List of Available Custom Fields for Theme?
  47. Save, update, get and sanitize post meta as HTML not plain
  48. Create Shortcode shows only posts with custom_field meta
  49. update meta field value after
  50. 4 Unique Random Posts based on Custom Field Values
  51. Create Meta boxes dynamically
  52. Custom Fields Not Working In Footer
  53. ACF plugin and field update
  54. Saved Post Meta Array Returns as String
  55. Query Multiple meta
  56. Delete custom meta
  57. Query Posts based on custom field value
  58. Problem saving meta data
  59. Check if value exists before saving
  60. Echo out custom fields in comments
  61. Get meta value when the page is a blog archive
  62. Search one custom field?
  63. Can’t save meta field value if the title not set
  64. Display Data From This Custom Media Upload Meta Box?
  65. Save values generated via API as custom meta fields
  66. Sorting Posts with meta value not working
  67. Query postmeta values, and return multiple post_titles for common meta value
  68. When post is updated, custom metadata in text area field is overwritten
  69. change attachment custom field onChange event
  70. Adding custom fields to images
  71. How to save dynamically generated value in post type?
  72. wordpress simple post multi rating with post_meta and user_meta
  73. Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete
  74. wp_postmeta are updated for only one page
  75. update_post_meta not working in action hook
  76. how to show this part only in the single post page?
  77. Display meta data from a custom field within plugin Category Grid View Gallery
  78. When editing a post with a custom meta box the values aren’t displaying correctly
  79. Hard Define Custom Field Value
  80. Custom fields / meta box output
  81. If post custom meta data is not set, show normal state
  82. add_post_meta insert null value into Database
  83. Make Custom Fields Public in JSON – API
  84. How do i output images from URL’s added to the same custom field key
  85. Retrieving custom field as shortcode
  86. Colecting values from custom field checkboxes and displaying them in the post
  87. Build Array from Input Fields question
  88. Display a list of posts whose meta field values are equal to the ID of the post being viewed?
  89. custom field with links
  90. add multiple values (array) to post meta_input
  91. Order by a meta field in query loop
  92. How can i put a custom field inside this php
  93. Check for custom field value in different post type than current one and do something
  94. Custom Fields after update to WordPress 6
  95. Site uses wpdb to fetch meta_keys but just displays first meta_key from a page (the post uses the same meta_key “filmmaker” more than once)
  96. save all acf options in one meta_value [closed]
  97. How to add new Metadata options (Date, Author, etc.) for Posts?
  98. Search for meta_query does not return any result if combined with title
  99. Can I count every article following extracted meta value?
  100. Best Practice for storing aggregate data by date or other criteria?
Categories custom-field Tags block-editor, custom-field, meta-value, post-meta
Gutenberg move post/page title to Editor sidebar document panel
Custom Gutenberg block with nested InnerBlocks renderAppender not displaying add button

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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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