As far as I can tell, that’s still not possible. getEntityRecords()
uses the REST API, but that doesn’t support meta queries by default. You can follow ticket #47194 if you’d like to keep tabs on the request to add support, or contribute to it.
For now, using rest_{posttype}_query
seems to be the conventional way to achieve what you want. I’d recommend that over creating a custom endpoint.
Don’t forget that you’ll need to register the meta if you also want to see it in the response.
Related Posts:
- 404 in gutenberg autosave of a Custom Post Type with custom rest_namespace
- Editor API Endpoint or Data Store That Provides a List of Meta Fields for Post Types
- Is it possible to access the wp-admin from one instance while keeping WP_HOME pointing to the balancing url?
- Custom Endpoint API based on attribute gutenberg block
- Proxy External API request in PHP from Edit.js in Block Plugin
- Custom validation on publish/ update in Block Editor
- Unable to edit server side rendered block
- apiFetch() returns infinite requests
- Block editor – Too many requests for server host
- fetch more than 100 records in block editor API call
- Block editor not loading with rest api custom code
- WP Gutenberg – How to parse simple images?
- Get the email of the author of the currently being edited post in Gutenberg frontend
- Add To Gutenberg Sidebar
- How to detect the usage of Gutenberg
- Possible to use @wordpress/create-block with multiple blocks?
- What is the advantage of ‘register_block_type’ (the PHP function) when creating custom blocks?
- The Block Editor: Disable “Color settings” in the specific block
- Serialize custom block with InnerBlock
- What replaces wpColorPicker in Gutenberg?
- Find all the places where a block type is used
- Why is the new Gutenberg editor so narrow, and how to make it wider?
- WP Blocks – Gutenberg – not rendering $content
- Why does the custom HTML block not preserve the HTML characters?
- Can’t get dynamic Gutenberg block to render on the frontend
- Gutenberg change/remove “Write your story” placeholder in custom blocks
- How do I listen for a change in an innerBlock child?
- How to enable Gutenberg Block Editor on taxonomy term pages?
- What’s the absolute minimum code that I need to create a dynamic block?
- Add custom attributes to link in Gutenberg
- Custom Gutenberg Block: Excluding an allowed block from InnerBlock’s templateLock={‘all’}
- Determine if block has already been registered
- InnerBlocks breaks Flexbox and CSS Grid styles
- Is there a way to set the gutenberg color palette outside the theme?
- Gutenberg get withState variable in save function
- Gutenberg block JavaScript localisation on Polyglots does not work
- how define elements type in attributes type array of gutenberg blocks
- Convert GMT time to local time in Gutenberg Block Editor
- Restrict heading level in Gutenberg block `core/heading`
- How do I disable or hide the Layout block setting in the Group block
- Cleaning up after block dismount
- How to transform a legacy widget into a block
- I cant see Block Editor with v5.7
- How to update block attribute after format is applied?
- How to add a class to the link of the default Gutenberg Button block?
- How to identify what templates are being loaded in a block-based theme [closed]
- Check if current page is using blocks (Gutenberg) or is legacy
- Add support for ‘alignnone’ to Gutenberg block align controls?
- How do I replace a audio gutenberg block to native audio wordpress
- Converting a theme to Gutenberg but some styles are missing in the front end [closed]
- How to generate block ID for use in post_content JSON data
- Where in a WordPress installation is the code for the default Gutenberg blocks located? [duplicate]
- Display selected image in the MediaPlaceholder component
- ACF and Gutenberg block, how to use blocks without ?
- Submitting a block to the .org repo: do I submit compiled code, or source code? [closed]
- Using 2 HTML blocks in Gutenberg to wrap content with div
- Add button to Block toolbar: toggleFormat is undefined
- In a block transform, how do I insert innerBlocks?
- What is the name of the user capability to read a reusable block?
- Gutenberg – Prevent Column Nesting in the Visual Editor
- How to remove whitespaces from source of posts created through WordPress Gutenberg editor
- Gutenberg blocks (block editor) with get_the_excerpt and get_the_content, using ACF
- Basic use of useState
- Gutenburg: Remove border of selected block
- Sort Posts by Sticky then by Latest date using the Latest Posts Block
- Unwanted white space next to inputs added within `PluginDocumentSettingPanel` using “
- ToolbarDropdownMenu component missing from @wordpress/scripts package
- Gutenberg Custom Block Not Validating – Ideas?
- Gutenberg dynamic block render_callback gives null for $post
- How to add srcdoc attribute to YouTube oEmbed in Gutenberg oEmbed Block
- Pass props / function to InnerBlocks
- Block editor: content resets to the previous state in “Edit as HTML” by clicking somewhere outside of the editing window
- Possible to add the title of a custom gutenberg block to the edit screen?
- Post Format Link using Guttenberg
- How do I hide the UI for specific Gutenberg Blocks?
- Creating a Dynamic InnerBlock that updates depending on state
- Error After Installing Gutenberg plugin (caused by attempt to stop WP from stripping out tags)
- Block validation failed – escaped HTML in content save
- Add media dynamically on gutenberg block
- FormTokenField passing objects to value property
- Trying to save an object into post meta with wp.data.dispatch(‘core/editor’).editpost
- Core Block Columns Attributes for Innerblocks Template
- Get Menu Items from REST API (React)
- WordPress – Increase number of posts in “Add Link” dialogue
- Block UI data table
- How to use correctly Panel in block/editor?
- How to restrict gutenberg block next post & previous post to same category?
- Where is getSite selector defined?
- How properly use social link block in template part
- How do I have two RadioControls in my custom Gutenberg block?
- WordPress block editor template parts not saving
- REST API error in block editor for custom templates
- Conditionally Load JS for Block Style
- Custom WP Blocks (register_block_type) in a Parent Theme
- blocks.getSaveElement not working for core/social-link
- How do I load styles into the block editor admin screen?
- Removing Default Panels From Gutenberg Document Setting Panel (sidebar)
- Default RichText Editor custom block fails validation
- Gutenberg editor styles not applied
- Responsive rules with block themes and theme.json