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. Why is the ‘Gutenberg’ Plugin generating an ‘Inconsistent File Permissions’ error when other Plugins, with the same permissions, do not?
  35. How to get all posts belongs to a user between a certain date
  36. Adding custom meta boxes to specified custom post type
  37. Post status doesn’t update to ‘future’ every time?
  38. Remember the Meta Value With Radio Buttons
  39. Delete data from custom table when deleting a post
  40. Plugin is creating posts twice
  41. Link Posts to External URL
  42. How to get Recent Post From Each Category with Thumbnail?
  43. help intercepting save_post through plugin
  44. Use a custom block in another block
  45. What snippet do I need to type to show my ACF field show up on my theme?
  46. Gutenberg default attributes are empty when accessing in edit
  47. Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
  48. Is there a way to make [Table Of Content] plugin while not using revision data?
  49. Is it possible to pin a post in second position from top
  50. Has blocks gutenberg block multiples registers type in my Plugin
  51. Fixed: Console.log twice in the edit function
  52. How to display the custom post related blog by category?
  53. WP Forms not displaying,becomming an fatal error
  54. How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
  55. How to dynamically add template in Innerblock?
  56. how to auto random increment for post view
  57. How to securely controlling data without keeping it in postmeta?
  58. How can I see $post object in frontend from functions.php?
  59. Allow members to create groups on my site
  60. add tags to wordpress post using REST API
  61. “Enable Media Replace” plugin does not update serialized object in WPMeta
  62. Performance considerations – postmeta table versus new table for custom posts with foreign keys?
  63. Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
  64. Block content rendering on the top just below body tag
  65. WordPress Product Detail and catalog
  66. Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
  67. How can I get the Post ID and Post Type within a Must Use Plugin?
  68. Get value from an input field and pass into update_meta_data as $meta_value
  69. How to get post that has non zero or greater than zero meta value
  70. Delete postmeta when uninstall/delete plugin
  71. Get content and send to 3rd party
  72. Displaying friend’s posts only
  73. Storing values in Post Meta vs new tables
  74. Get page type to display content
  75. Capturing POST data
  76. Custom feed parameters / Template overriding
  77. Gutenberg: Dynamic Block – Show saved data in the editor
  78. wordpress last all added get meta value by post id
  79. Get post id in Post Page within Wp-admin
  80. Plugin to display text before a post
  81. Create plugin with multiple blocks
  82. How do I set register_meta for a specific CPT?
  83. How do I save meta key value in the save function?
  84. Update Content for a Custom Block Toolbar Button
  85. Wrong block appender button showing
  86. How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?
  87. warning wp session
  88. Vanilla javascript in custom gutenberg block not working
  89. WordPress custom block: Link saved in database not retrieved when editing post
  90. Why is my Gutenberg block not saving and rendering the chessboard?
  91. How can we extent core/group or cover block?
  92. Force post update with React
  93. Editing a block to add a button to have a drop cap
  94. Zip using “wp-scripts plugin-zip” with custom “build” folder and subfolders?
  95. How to list latest 5 posts from each author from a custom CPT? I want to create a custom Gutenberg block
  96. Custom block padding control (via support) initialization
  97. WordPress custom block: How to treat each button as a separate block?
  98. Custom block based off core block using filter
  99. How to change the version of block.js and plugin to the same of Package.json?
  100. How do I apply different block supports to different parts of my custom block?
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
  • 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