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

Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS

Have you tried using:

            setImage: function( image_url, image_id ) {
                dispatch( 'core/editor' ).editPost(
                    {
                        meta: {
                            'og_image_url': image_url,
                            'og_image_id': image_id
                        }
                    }
                );
            }

Instead of using a generic setMetaValue function?

Related Posts:

  1. Help to Create a Simple Plugin to make a post
  2. How can I make it so the Add New Post page has Visibility set to Private by default?
  3. Show Similar Post Titles ( Similar to Stack Exchange )
  4. How to add option box in “Edit Post” plugin API?
  5. How do I unlock a post programmatically?
  6. Update Multiple Post Meta for the Same Post In One call?
  7. How To Ignore a Filter On Applying Filter the Content In a Function
  8. How to get posts by content?
  9. Publish Post After Click On A Link
  10. Updating post meta for custom post types
  11. How can I add a custom meta value on file upload?
  12. Action on post publish
  13. Passing select control value to block
  14. Set attached to state
  15. Passing RichText attributes to function onChange
  16. How do I store information in a dynamic block in WordPress?
  17. How to change ID of an attachment in wp_posts and its related tables correctly?
  18. How use %like% in sql statement wordpress
  19. How to create custom embed block in gutenberg wordpress
  20. Adding Attachment Display Settings in custom media frame
  21. Execute a plugin only on post pages
  22. How to use get_theme_mod in gutenberg editor wordpress?
  23. Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
  24. finding whether request is for post, and post id
  25. How to add Internationalization in WordPress using Javascript/React?
  26. how to disable blockrenderAppender inside all Innerblocks?
  27. WordPress Gutenberg react make import of __experimentalUseInnerBlocksProps which is no more experimetal
  28. Display post lists in 2nd paragraph
  29. Using SVN to upload plugin created with gutenberg blocks
  30. How can I change the meta_key for a particular piece of information?
  31. Redirect to another page using contact form 7? [closed]
  32. Would Gutenberg be considered a PlugIn?
  33. How to add custom table style for table block in gutenberg editor
  34. Gutenberg Block Style CSS Class Is Not Applying on Backend
  35. Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
  36. How to get all posts belongs to a user between a certain date
  37. Adding custom meta boxes to specified custom post type
  38. Post status doesn’t update to ‘future’ every time?
  39. Remember the Meta Value With Radio Buttons
  40. Delete data from custom table when deleting a post
  41. Plugin is creating posts twice
  42. Link Posts to External URL
  43. How to get Recent Post From Each Category with Thumbnail?
  44. help intercepting save_post through plugin
  45. Use a custom block in another block
  46. What snippet do I need to type to show my ACF field show up on my theme?
  47. Gutenberg default attributes are empty when accessing in edit
  48. Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
  49. Is there a way to make [Table Of Content] plugin while not using revision data?
  50. Is it possible to pin a post in second position from top
  51. Has blocks gutenberg block multiples registers type in my Plugin
  52. Fixed: Console.log twice in the edit function
  53. How to display the custom post related blog by category?
  54. WP Forms not displaying,becomming an fatal error
  55. How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
  56. How to dynamically add template in Innerblock?
  57. how to auto random increment for post view
  58. How to securely controlling data without keeping it in postmeta?
  59. How can I see $post object in frontend from functions.php?
  60. Allow members to create groups on my site
  61. add tags to wordpress post using REST API
  62. “Enable Media Replace” plugin does not update serialized object in WPMeta
  63. Performance considerations – postmeta table versus new table for custom posts with foreign keys?
  64. Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
  65. Block content rendering on the top just below body tag
  66. WordPress Product Detail and catalog
  67. Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
  68. How can I get the Post ID and Post Type within a Must Use Plugin?
  69. Get value from an input field and pass into update_meta_data as $meta_value
  70. How to get post that has non zero or greater than zero meta value
  71. Delete postmeta when uninstall/delete plugin
  72. Get content and send to 3rd party
  73. Displaying friend’s posts only
  74. Storing values in Post Meta vs new tables
  75. Get page type to display content
  76. Capturing POST data
  77. Custom feed parameters / Template overriding
  78. Gutenberg: Dynamic Block – Show saved data in the editor
  79. wordpress last all added get meta value by post id
  80. Get post id in Post Page within Wp-admin
  81. Plugin to display text before a post
  82. Create plugin with multiple blocks
  83. How do I set register_meta for a specific CPT?
  84. How do I save meta key value in the save function?
  85. Update Content for a Custom Block Toolbar Button
  86. Wrong block appender button showing
  87. How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?
  88. warning wp session
  89. Vanilla javascript in custom gutenberg block not working
  90. WordPress custom block: Link saved in database not retrieved when editing post
  91. Why is my Gutenberg block not saving and rendering the chessboard?
  92. How can we extent core/group or cover block?
  93. Force post update with React
  94. How to change the version of block.js and plugin to the same of Package.json?
  95. How do I apply different block supports to different parts of my custom block?
  96. Custom Gutenberg blocks not showing in WP editor
  97. How to show custom message once on plugin activation?
  98. API to filter new user registration $POST data?
  99. Re use the list table for a custom post type on another page
  100. Add action to fire when a published post is updated
Categories plugins Tags block-editor, plugin-development, plugins, post-meta, posts
Creating duplicate WordPress site for development reasons
wp-admin send 404 error

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